@gabison/cedar-a7 0.0.0-stage → 27.1.0-handoff.20261028.1

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 CHANGED
@@ -1,3 +1,81 @@
1
- # Temporary Holding Version
1
+ # @expo/simulator-launcher
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Warm iOS Simulators before an EAS job arrives. Requires macOS.
4
+ The image installs vm-tools and writes its startup script at
5
+ `/usr/local/share/vm-tools/startup.sh`:
6
+
7
+ ```sh
8
+ export EXPO_SIMULATOR_STARTUP=1
9
+ export EXPO_SIMULATOR_DEVICE="iPhone Duo,iPhone 18"
10
+ exec bunx @expo/simulator-launcher@latest start
11
+ ```
12
+
13
+ ## Commands
14
+
15
+ - `start`: run one orphan serve-sim for the configured devices. Its default device becomes ready
16
+ first; additional devices warm in the background. Argent and agent-device prestart on the default.
17
+ - `claim ENGINE [DEVICE]`: reserve one job and return its selected device plus the existing server's
18
+ identity, port and credentials. Engines: `serve-sim`, `agent-device`, `argent`, `appium`.
19
+ No DEVICE means the first configured device. Claim does not boot the selected device or wait for
20
+ its tool. Build-tools privately adopts that device on the existing serve-sim port.
21
+ - `prepare-tools`: continue the consumed claim after adoption. Keep global Argent, reuse the default
22
+ agent-device runner or prepare a runner for the selected device. Appium waits for old XCTest cleanup.
23
+ - `stop`: permanently end warmup for this boot and wait for all owned resources to be cleaned up.
24
+
25
+ ```sh
26
+ # Build-tools reads LAUNCHER_VERSION from the version recorded by start.
27
+ bun x --no-install "@expo/simulator-launcher@$LAUNCHER_VERSION" claim serve-sim
28
+ # After private serve-sim adoption confirms the selected device and native ACK:
29
+ bun x --no-install "@expo/simulator-launcher@$LAUNCHER_VERSION" prepare-tools
30
+ bun x --no-install "@expo/simulator-launcher@$LAUNCHER_VERSION" stop
31
+ ```
32
+
33
+ There is no copied launcher bundle. Build-tools uses the recorded package version for claim/stop;
34
+ Warmup primes Bun’s exact-version cache before ready, with two attempts of up to 30 seconds. Its claim/stop calls use `--no-install`, retrying
35
+ once with the registry only when Bun cannot find that cached binary. Priming failures warn.
36
+ Before start has run,
37
+ stop uses the normal package-manager path and still disables later warmup for this boot.
38
+
39
+ This flow requires the serve-sim release supporting port-based device adoption.
40
+
41
+ One durable state file, `/tmp/expo-simulator-startup.json`, holds the lifecycle, launcher version,
42
+ selected device, server credentials, claim and native identity. It is independent of HOME/TMPDIR. A short boot-scoped lock
43
+ serializes updates; an abandoned lock fails closed. This private format requires a fresh VM.
44
+
45
+ ## Environment
46
+
47
+ - `EXPO_SIMULATOR_STARTUP=1` enables warmup.
48
+ - `EXPO_SIMULATOR_PREINSTALL_EXPO_GO=0` turns off the Expo Go preinstall.
49
+ - `EXPO_SIMULATOR_DEVICE` is a comma-separated list of exact device names or UDIDs. Entries are
50
+ trimmed and must each identify one available device. The first is the default. Unset keeps
51
+ the shortest available iPhone name, as does an empty or blank value. Empty list entries, missing,
52
+ ambiguous or duplicate devices fail clearly.
53
+ - `SERVE_SIM_VERSION`, `AGENT_DEVICE_VERSION`, `ARGENT_VERSION`: each defaults to `latest`.
54
+ - `AGENT_DEVICE_STATE_DIR`, `ARGENT_EVENT_LOG`: tool state/output locations.
55
+ - Agent-device idle timers default to off. Override with `AGENT_DEVICE_DAEMON_IDLE_TIMEOUT_MS`
56
+ and `AGENT_DEVICE_IOS_RUNNER_IDLE_STOP_MS` (milliseconds).
57
+
58
+ ## Boundaries
59
+
60
+ - Ready means the default device booted and serve-sim answers. The apsd step and the Expo Go
61
+ preinstall run in the background on every listed device. A claim does not wait for them; stop
62
+ joins them.
63
+ The second device may not have started yet. Its startup failure leaves the default available.
64
+ Claim reserves a device; it does not report that device ready. Private adoption must confirm
65
+ the same server PID/port, selected-device readiness and native video/capture before tool setup
66
+ and app actions. Job-time version and authentication checks remain authoritative.
67
+ - Agent-device prestarts on the default device only. A secondary claim prepares its runner after
68
+ adoption and old-runner cleanup finish. One device-independent Argent server is reused for the claimed device.
69
+ Appium waits for unused tools to stop before starting its own WDA.
70
+ - Warmup downloads/extracts the latest stable Expo Go once and reuses it for the second device.
71
+ Each initial device gets a preinstall attempt; ordinary failures warn. Claim prevents new
72
+ preinstalls. `prepare-tools` waits for an install still running on the claimed device and
73
+ reports its version, because the job installs its app next. Installs on other devices continue;
74
+ adoption may shut such a device down, and its install then fails with a warning. Terminal stop
75
+ drains them and the download cleanup. Job app installs remain
76
+ authoritative. Replacements do not preinstall again. The VM image provides ffmpeg.
77
+ - One start attempt and one accepted claim per boot. Failed cleanup never permits another session.
78
+ Stop's caller timeout is not a global cleanup deadline or proof that teardown completed.
79
+ A build-tools claim timeout uses normal startup only after confirmed terminal cleanup.
80
+
81
+ Claim and tool JSON include credentials; capture them rather than streaming them to job logs.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/index').runCliAsync();