@swmansion/argent 0.30.2-next.18 → 0.30.2-next.19
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 +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/tool-args.generated.d.ts +2 -0
- package/dist/tool-server.cjs +27 -5
- package/package.json +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -35594,7 +35594,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
35594
35594
|
var SESSION_ID2 = randomUUID5();
|
|
35595
35595
|
function readCliVersion() {
|
|
35596
35596
|
if (true) {
|
|
35597
|
-
return "0.30.2-next.
|
|
35597
|
+
return "0.30.2-next.19";
|
|
35598
35598
|
}
|
|
35599
35599
|
return "0.0.0";
|
|
35600
35600
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -16900,7 +16900,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16900
16900
|
var SESSION_ID = randomUUID4();
|
|
16901
16901
|
function readCliVersion() {
|
|
16902
16902
|
if (true) {
|
|
16903
|
-
return "0.30.2-next.
|
|
16903
|
+
return "0.30.2-next.19";
|
|
16904
16904
|
}
|
|
16905
16905
|
return "0.0.0";
|
|
16906
16906
|
}
|
|
@@ -53,6 +53,8 @@ export interface ArgentToolArgs {
|
|
|
53
53
|
force?: boolean;
|
|
54
54
|
/** Android only: boot the emulator with audio output enabled. Defaults to false: argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/HarmonyOS/Electron, which argent never mutes. */
|
|
55
55
|
sound?: boolean;
|
|
56
|
+
/** Android on a macOS host only: boot the emulator with guest Vulkan. Defaults to false: guest Vulkan crashes Chrome's GPU process, which breaks Chrome and Custom Tab sign-in flows. Without it apps find no Vulkan device, although the guest still lists the Vulkan features, so a Vulkan-only renderer such as WebGPU (react-native-wgpu) draws nothing; pass `true` to test one. Takes effect at boot: an emulator already running in the other mode is reused with a `note`, and `force: true` reboots it. A boot snapshot saved in the other mode can't be reused, so the first boot after toggling is a slower cold boot. The `ARGENT_EMULATOR_GUEST_VULKAN` env var flips this default to true. Ignored on other hosts and platforms. */
|
|
57
|
+
guestVulkan?: boolean;
|
|
56
58
|
/** iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server; used by Argent Lens. Set the `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) to force this host-wide without passing the flag per call (the iOS analog of `ARGENT_EMULATOR_NO_WINDOW`). Ignored on Android/Vega/HarmonyOS/Electron, which have no equivalent GUI step. */
|
|
57
59
|
headless?: boolean;
|
|
58
60
|
/** Electron: path to the Electron app to launch. Either a packaged .app bundle / executable, or a project directory whose package.json points the Electron binary at the entry script. Provide exactly one of `udid`, `avdName`, `vvdImage`, `harmonyInstance`, or `electronAppPath`. */
|
package/dist/tool-server.cjs
CHANGED
|
@@ -100945,7 +100945,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
100945
100945
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
100946
100946
|
function readCliVersion() {
|
|
100947
100947
|
if (true) {
|
|
100948
|
-
return "0.30.2-next.
|
|
100948
|
+
return "0.30.2-next.19";
|
|
100949
100949
|
}
|
|
100950
100950
|
return "0.0.0";
|
|
100951
100951
|
}
|
|
@@ -137046,6 +137046,9 @@ function iosHeadlessFromEnv() {
|
|
|
137046
137046
|
function androidHeadlessFromEnv() {
|
|
137047
137047
|
return truthyEnv("ARGENT_EMULATOR_NO_WINDOW");
|
|
137048
137048
|
}
|
|
137049
|
+
function androidGuestVulkanFromEnv() {
|
|
137050
|
+
return truthyEnv("ARGENT_EMULATOR_GUEST_VULKAN");
|
|
137051
|
+
}
|
|
137049
137052
|
|
|
137050
137053
|
// ../tool-server/src/tools/devices/boot-device.ts
|
|
137051
137054
|
init_device_info();
|
|
@@ -137798,6 +137801,9 @@ var zodSchema9 = external_exports.object({
|
|
|
137798
137801
|
sound: external_exports.boolean().optional().describe(
|
|
137799
137802
|
"Android only: boot the emulator with audio output enabled. Defaults to false: argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega<flag:harmonyos>/HarmonyOS</flag:harmonyos>/Electron, which argent never mutes."
|
|
137800
137803
|
),
|
|
137804
|
+
guestVulkan: external_exports.boolean().optional().describe(
|
|
137805
|
+
"Android on a macOS host only: boot the emulator with guest Vulkan. Defaults to false: guest Vulkan crashes Chrome's GPU process, which breaks Chrome and Custom Tab sign-in flows. Without it apps find no Vulkan device, although the guest still lists the Vulkan features, so a Vulkan-only renderer such as WebGPU (react-native-wgpu) draws nothing; pass `true` to test one. Takes effect at boot: an emulator already running in the other mode is reused with a `note`, and `force: true` reboots it. A boot snapshot saved in the other mode can't be reused, so the first boot after toggling is a slower cold boot. The `ARGENT_EMULATOR_GUEST_VULKAN` env var flips this default to true. Ignored on other hosts and platforms."
|
|
137806
|
+
),
|
|
137801
137807
|
headless: external_exports.boolean().optional().describe(
|
|
137802
137808
|
"iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server; used by Argent Lens. Set the `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) to force this host-wide without passing the flag per call (the iOS analog of `ARGENT_EMULATOR_NO_WINDOW`). Ignored on Android/Vega<flag:harmonyos>/HarmonyOS</flag:harmonyos>/Electron, which have no equivalent GUI step."
|
|
137803
137809
|
),
|
|
@@ -137865,6 +137871,16 @@ function selectGpuMode() {
|
|
|
137865
137871
|
}
|
|
137866
137872
|
return process.platform === "linux" ? "swiftshader" : "auto";
|
|
137867
137873
|
}
|
|
137874
|
+
function guestVulkanArgs(guestVulkan) {
|
|
137875
|
+
if (process.platform !== "darwin") return [];
|
|
137876
|
+
return ["-feature", guestVulkan ? "Vulkan" : "-Vulkan"];
|
|
137877
|
+
}
|
|
137878
|
+
async function runningGuestVulkanNote(serial, guestVulkan) {
|
|
137879
|
+
if (process.platform !== "darwin") return void 0;
|
|
137880
|
+
const prop = await adbShell(serial, "getprop ro.boot.hardware.vulkan", { timeoutMs: 5e3 }).then((out) => out.trim()).catch(() => null);
|
|
137881
|
+
if (prop === null || prop !== "" === guestVulkan) return void 0;
|
|
137882
|
+
return guestVulkan ? "This emulator was already running without guest Vulkan, so apps find no Vulkan device. Pass `force: true` to reboot it with guest Vulkan." : "This emulator was already running with guest Vulkan, which can crash Chrome's GPU process. Pass `force: true` to reboot it without guest Vulkan.";
|
|
137883
|
+
}
|
|
137868
137884
|
var BOOT_POLL_INTERVALS_MS = {
|
|
137869
137885
|
serialByAvd: 1500,
|
|
137870
137886
|
// findSerialByAvdName: re-scan when >1 new emulator appeared
|
|
@@ -138276,7 +138292,10 @@ async function bootAndroidImpl(params) {
|
|
|
138276
138292
|
await ensureDep("adb");
|
|
138277
138293
|
await ensureDep("emulator");
|
|
138278
138294
|
const gpuMode = selectGpuMode();
|
|
138279
|
-
const extraEmulatorArgs =
|
|
138295
|
+
const extraEmulatorArgs = [
|
|
138296
|
+
...androidHeadlessFromEnv() ? ["-no-window"] : [],
|
|
138297
|
+
...guestVulkanArgs(params.guestVulkan)
|
|
138298
|
+
];
|
|
138280
138299
|
const hardeningArgs = launchHardeningArgs(params.sound);
|
|
138281
138300
|
for (const msg of linuxBootDiagnostics(params.avdName) ?? []) {
|
|
138282
138301
|
console.warn(`[boot-device:linux] ${msg}`);
|
|
@@ -138340,11 +138359,13 @@ async function bootAndroidImpl(params) {
|
|
|
138340
138359
|
} else {
|
|
138341
138360
|
try {
|
|
138342
138361
|
await assertScreencapAlive(alreadyRunning.serial);
|
|
138362
|
+
const note = await runningGuestVulkanNote(alreadyRunning.serial, params.guestVulkan);
|
|
138343
138363
|
return {
|
|
138344
138364
|
platform: "android",
|
|
138345
138365
|
serial: alreadyRunning.serial,
|
|
138346
138366
|
avdName: params.avdName,
|
|
138347
|
-
booted: true
|
|
138367
|
+
booted: true,
|
|
138368
|
+
...note ? { note } : {}
|
|
138348
138369
|
};
|
|
138349
138370
|
} catch (_err) {
|
|
138350
138371
|
await dropKilledEmulator(alreadyRunning.serial);
|
|
@@ -138966,7 +138987,7 @@ function createBootDeviceTool(registry2) {
|
|
|
138966
138987
|
description: `Start an iOS simulator, launch an Android emulator, start a Vega (Fire TV) Virtual Device, <flag:harmonyos>start a HarmonyOS emulator, </flag:harmonyos>or spawn an Electron app and wait until it is ready to accept interactions.
|
|
138967
138988
|
Pick the platform by which argument you pass: 'udid' for an iOS simulator from list-devices, 'avdName' for an Android AVD (a serial is assigned automatically), 'vvdImage' for a Vega VVD (the 'vvdImage' of a vega device from list-devices, e.g. 'tv'), <flag:harmonyos>'harmonyInstance' for a HarmonyOS emulator instance (the 'name' of a harmony device from list-devices), </flag:harmonyos>or 'electronAppPath' for an Electron app (a CDP remote-debugging port is picked automatically, or pass 'electronPort' to fix one).
|
|
138968
138989
|
Use at the start of a session once you have picked a target.
|
|
138969
|
-
Returns a tagged payload: { platform: 'ios', udid, booted } or { platform: 'android', serial, avdName, booted } or { platform: 'vega', serial, vvdImage, booted } or <flag:harmonyos>{ platform: 'harmony', udid, instanceName, booted, note? } or </flag:harmonyos>{ platform: 'chromium', id, port, pid, booted } (an Electron app boots as a Chromium/CDP device).
|
|
138990
|
+
Returns a tagged payload: { platform: 'ios', udid, booted } or { platform: 'android', serial, avdName, booted, note? } or { platform: 'vega', serial, vvdImage, booted } or <flag:harmonyos>{ platform: 'harmony', udid, instanceName, booted, note? } or </flag:harmonyos>{ platform: 'chromium', id, port, pid, booted } (an Electron app boots as a Chromium/CDP device).
|
|
138970
138991
|
Android boots take 2\u201310 minutes depending on machine and cold/warm state; the tool transparently hot-boots from the AVD's default_boot snapshot when usable and falls back to cold boot otherwise. Vega starts the single SDK-managed VVD via the vega CLI (~10s) and returns once it reports running. If an Android/Electron boot stage fails, the tool terminates the device it spawned so the next retry starts clean.<flag:harmonyos>
|
|
138971
138992
|
HarmonyOS hands the instance to DevEco Studio's Emulator manager, then waits for it to register with 'hdc' and returns its connect key as 'udid', the id the interaction tools drive. The manager itself reports no readiness signal and never names a port, so an instance that is already running is left alone unless you pass 'force: true'; when the key could not be resolved the payload names the instance instead, and a 'note' is present whenever the boot left something unproven: no key and why, or a key that is not yet answering or could not be checked against the instance. Huawei serves the emulator images only within mainland China, so a host outside it usually has no instance to start; one that already has an image is started like any other.</flag:harmonyos>`,
|
|
138972
138993
|
alwaysLoad: true,
|
|
@@ -139029,7 +139050,8 @@ HarmonyOS hands the instance to DevEco Studio's Emulator manager, then waits for
|
|
|
139029
139050
|
// An explicit argument always wins; the `boot-sound` flag only moves
|
|
139030
139051
|
// the default when the caller left `sound` unset. Read live per call
|
|
139031
139052
|
// so `argent enable/disable boot-sound` applies without a restart.
|
|
139032
|
-
sound: params.sound ?? isFlagEnabled("boot-sound")
|
|
139053
|
+
sound: params.sound ?? isFlagEnabled("boot-sound"),
|
|
139054
|
+
guestVulkan: params.guestVulkan ?? androidGuestVulkanFromEnv()
|
|
139033
139055
|
});
|
|
139034
139056
|
}
|
|
139035
139057
|
if (hasVega) {
|
package/package.json
CHANGED