stim 1.13.0 → 1.15.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.
Files changed (133) hide show
  1. package/README.md +2 -0
  2. package/dist/{activity-DfVKZTEB.mjs → activity-B2-kb7k0.mjs} +281 -41
  3. package/dist/{android-BHfAu2mf.mjs → android-CYmq0jNi.mjs} +2 -2
  4. package/dist/{android-CD8pr8Q2.mjs → android-Cu_L4RpL.mjs} +524 -412
  5. package/dist/{android-qx_31wJo.mjs → android-Db2eEMaf.mjs} +152 -65
  6. package/dist/android-cas-PnKfAdB2.mjs +167 -0
  7. package/dist/android-cas-compiler.mjs +2 -2
  8. package/dist/{app-install-CDFY2nUL.mjs → app-install-CAAplXAt.mjs} +162 -173
  9. package/dist/{budget-E5o91NR1.mjs → budget-CMiqghig.mjs} +1048 -77
  10. package/dist/{build-plan-BTa93o_r.mjs → build-plan-aeGMFX7e.mjs} +193 -650
  11. package/dist/build-progress-C2Jv1AtA.mjs +872 -0
  12. package/dist/build-slots-Df1ApSuH.mjs +127 -0
  13. package/dist/{cache-manifest-DWPF4RKJ.mjs → cache-manifest-DnUHBJaU.mjs} +2 -2
  14. package/dist/cache-manifest.mjs +1 -1
  15. package/dist/{chrome-B5hWgQJS.mjs → chrome-BrcVWQyD.mjs} +4 -4
  16. package/dist/cli-0cX5s4NM.mjs +45 -0
  17. package/dist/cli.mjs +6 -42
  18. package/dist/client-C2IS36Qf.mjs +1333 -0
  19. package/dist/collector-run.mjs +8 -7
  20. package/dist/{command-output-BIL7rlX7.mjs → command-output-CliHHn7a.mjs} +1 -1
  21. package/dist/{config-0jCcMM0E.mjs → config-D0DbpZtM.mjs} +29 -29
  22. package/dist/{created-devices-Cd558h31.mjs → created-devices-BwVb3liH.mjs} +2 -2
  23. package/dist/{dependency-state-DNN0yfx6.mjs → dependency-state-BmsjKZ2H.mjs} +2 -2
  24. package/dist/{deps-2Wo81np9.mjs → deps-BFlKbOIp.mjs} +3 -3
  25. package/dist/{detached-entry-DJHoca49.mjs → detached-entry-CiTEgMR1.mjs} +1 -1
  26. package/dist/dev-client-CjzLoNs0.mjs +80 -0
  27. package/dist/{device-Cf7vl-so.mjs → device-BZ1IyS5A.mjs} +7 -7
  28. package/dist/device-capacity-DMuKC7nx.mjs +136 -0
  29. package/dist/device-host-worker.d.mts +1 -0
  30. package/dist/device-host-worker.mjs +769 -0
  31. package/dist/device-ios-DMQBUPus.mjs +381 -0
  32. package/dist/{device-lease-CL9dZf73.mjs → device-lease-W5Pi1q38.mjs} +43 -36
  33. package/dist/{device-pool-MuoiyRcu.mjs → device-pool-B2r38YjS.mjs} +4 -4
  34. package/dist/{device-remote-DT9ngZiD.mjs → device-remote-9ulPsdhY.mjs} +68 -162
  35. package/dist/{doctor-D2iysNNH.mjs → doctor-BcE5xsBn.mjs} +191 -99
  36. package/dist/{error-diagnostics-BoiOhck8.mjs → error-diagnostics-Cb0P1WLS.mjs} +12 -11
  37. package/dist/{exec-DK8KaVHK.mjs → exec-CaErVv7t.mjs} +5 -1
  38. package/dist/{gc-eA-PRBX8.mjs → gc-BuL1Genr.mjs} +430 -102
  39. package/dist/{android-cas-B9Kv9aIy.mjs → gradle-CmdOBq1d.mjs} +8 -294
  40. package/dist/{guide-BfZ0OmiP.mjs → guide-cCSGRFd3.mjs} +2052 -240
  41. package/dist/{guide-status-BaMYu55M.mjs → guide-status-CIoWK6mG.mjs} +3 -3
  42. package/dist/hosted-macos-DwowNU7W.mjs +447 -0
  43. package/dist/idle-shutdown-B5LPaNyY.mjs +122 -0
  44. package/dist/in-use-CndPMilN.mjs +110 -0
  45. package/dist/{ios-CmEzZiOj.mjs → ios-3CtCRhwr.mjs} +201 -10
  46. package/dist/{ios-CcfCeZ19.mjs → ios-Chob8ny7.mjs} +560 -259
  47. package/dist/{ios-device-BW-t_Lkv.mjs → ios-device-DERmMmk-.mjs} +12 -7
  48. package/dist/{ios-device-BiOsSVzd.mjs → ios-device-Ee7sDXfp.mjs} +1 -1
  49. package/dist/{launch-verify-CuJaBpEa.mjs → launch-verify-CLlofxRt.mjs} +42 -11
  50. package/dist/{logs-DcSRbC2t.mjs → logs-h9h6MUvE.mjs} +95 -13
  51. package/dist/machine-usage-D_YYMzfR.mjs +283 -0
  52. package/dist/machines-CYtOCqcj.mjs +259 -0
  53. package/dist/macos-BwtbUtTN.mjs +468 -0
  54. package/dist/macos-run.d.mts +5 -0
  55. package/dist/macos-run.mjs +2 -0
  56. package/dist/{merge-state-ytFQCeh4.mjs → merge-state-BnxLNQiM.mjs} +22 -12
  57. package/dist/{metro-BPeY1YMh.mjs → metro-Di8EN2Tb.mjs} +20 -120
  58. package/dist/{named-ports-n7tnJsI8.mjs → named-ports-Dj_XBNaL.mjs} +8 -64
  59. package/dist/native-run-DFDoIRbY.mjs +147 -0
  60. package/dist/{native-runtime-CiiFHt0e.mjs → native-runtime-i6OkVg-w.mjs} +11 -6
  61. package/dist/offload-worker.d.mts +121 -0
  62. package/dist/offload-worker.mjs +601 -0
  63. package/dist/{ownership-Bz2kETAS.mjs → ownership-BkYxUtuj.mjs} +3 -2
  64. package/dist/{page-BTu7I60K.mjs → page-QF_Ke10s.mjs} +7 -2
  65. package/dist/{ports-C5UutqpJ.mjs → ports-DddwttKM.mjs} +3 -3
  66. package/dist/prebuild-BvxDlD6C.mjs +213 -0
  67. package/dist/process-identity-BmRm1qV0.mjs +12 -0
  68. package/dist/{project-DGeclhvO.mjs → project-CV3tDFHl.mjs} +9 -18
  69. package/dist/pull-request-pxnDCQzn.mjs +322 -0
  70. package/dist/pull-requests.d.mts +120 -0
  71. package/dist/pull-requests.mjs +2 -0
  72. package/dist/recordings-GEXp4iBT.mjs +37 -0
  73. package/dist/{reload-C-cV5yy_.mjs → reload-ChPiwvot.mjs} +70 -22
  74. package/dist/{remote-cache--aehr4Pr.mjs → remote-cache-CO2elm_b.mjs} +4 -4
  75. package/dist/run-B-xqRrsg.mjs +119 -0
  76. package/dist/{server-bare-Bq8BpSIo.mjs → server-bare-X7PUgizL.mjs} +60 -13
  77. package/dist/{server-expo-DUCg52-K.mjs → server-expo-DhtX6bom.mjs} +6 -10
  78. package/dist/server-expo-KJeD109I.mjs +2 -0
  79. package/dist/{settings-xB0Frkg6.mjs → settings-CduVcoxj.mjs} +77 -26
  80. package/dist/{settings-ssVBToDR.mjs → settings-DbL6uhH8.mjs} +16 -10
  81. package/dist/settings.schema.json +357 -2
  82. package/dist/{simslim-Bbg9UWrt.mjs → simslim-Ciluxlq4.mjs} +8 -132
  83. package/dist/slot-launch-BY0BrOLh.mjs +65 -0
  84. package/dist/{spawn-claims-PT8aQpCa.mjs → spawn-claims-D0XfSe8u.mjs} +1 -1
  85. package/dist/spawn-entry-DncpJvWL.mjs +16 -0
  86. package/dist/stage-CzaiwFsI.mjs +143 -0
  87. package/dist/start-CPO4wRg7.mjs +2 -0
  88. package/dist/{start-BZhItkiL.mjs → start-CUD9nasA.mjs} +108 -61
  89. package/dist/state-B4PQFXMW.d.mts +12 -0
  90. package/dist/state-BxCgeTQu.mjs +41 -0
  91. package/dist/{state-DwAU2_-D.mjs → state-CaeaHbDA.mjs} +7 -4
  92. package/dist/{state-l1pYwOre.mjs → state-DFm77wRn.mjs} +67 -5
  93. package/dist/stats-DBLLFmKd.mjs +66 -0
  94. package/dist/{status-TJlL0HWo.mjs → status-DYXxNOT0.mjs} +425 -260
  95. package/dist/{status-sszP4XKU.mjs → status-l84Gbvp2.mjs} +122 -20
  96. package/dist/stdout-reader-C8yjre1x.mjs +23 -0
  97. package/dist/stim-desktop-Cnz8CPnl.mjs +63 -0
  98. package/dist/stim-footprint.swift +32 -0
  99. package/dist/{stim-installations-CINXy_su.mjs → stim-installations-QMEI32v1.mjs} +1 -1
  100. package/dist/{stop-BZ2qMiBP.mjs → stop-Bad61z_2.mjs} +128 -19
  101. package/dist/stop-Bvf1MflS.mjs +48 -0
  102. package/dist/{stop-DskDKNTU.mjs → stop-CceYh1yG.mjs} +2 -2
  103. package/dist/stop-cause-CZ_Mr-v9.mjs +665 -0
  104. package/dist/supervisor-run.d.mts +44 -12
  105. package/dist/supervisor-run.mjs +276 -33
  106. package/dist/support-CDQbDkL5.mjs +315 -0
  107. package/dist/support-WLOzVKUv.mjs +176 -0
  108. package/dist/teardown-BYuQafiA.mjs +718 -0
  109. package/dist/{xcode-LM6A8cNZ.mjs → toolchain-DmeYjXD9.mjs} +363 -13
  110. package/dist/warm-progress-DVHLN4uC.mjs +463 -0
  111. package/dist/{idle-DxLi5OkN.mjs → watchman-Bx0wceoF.mjs} +55 -8
  112. package/dist/{web-sWXd5iek.mjs → web-k6w8-HnE.mjs} +39 -22
  113. package/dist/web-run.mjs +326 -13
  114. package/dist/workspace-process-lock-BL7Q0HCO.mjs +57 -0
  115. package/dist/workspace-state-CL2V2Ons.mjs +371 -0
  116. package/dist/worktree-BT_uULFx.mjs +2 -0
  117. package/dist/{worktree-DeBQSVtR.mjs → worktree-C0c5Udwa.mjs} +55 -54
  118. package/dist/{worktree-D4Do_XiQ.mjs → worktree-qXKzADSC.mjs} +161 -255
  119. package/package.json +10 -5
  120. package/shim/bundle-response.cjs +55 -10
  121. package/shim/bundle-response.d.cts +1 -0
  122. package/shim/expo-metro-config.cjs +10 -2
  123. package/dist/build-progress-l7d-X-ZP.mjs +0 -247
  124. package/dist/in-use-wYEaKQM9.mjs +0 -249
  125. package/dist/ownership-PUP4Dwai.mjs +0 -1138
  126. package/dist/server-expo-BeYwP_Xy.mjs +0 -2
  127. package/dist/slot-launch-BIWEW-wI.mjs +0 -19
  128. package/dist/start-Rw2GD3nV.mjs +0 -2
  129. package/dist/stats-CaSwmsSZ.mjs +0 -62
  130. package/dist/stats-D8rUTPHd.mjs +0 -368
  131. package/dist/stim-desktop-CXt8-Z3J.mjs +0 -40
  132. package/dist/worktree-3cBa-bQt.mjs +0 -2
  133. package/dist/{metro-store-DzeWkfqW.mjs → metro-store-CDDZHtPl.mjs} +1 -1
@@ -239,6 +239,7 @@
239
239
  "key": "ios.deviceType",
240
240
  "kind": "string",
241
241
  "scopes": [
242
+ "machine",
242
243
  "workspace",
243
244
  "repo",
244
245
  "committed"
@@ -252,6 +253,7 @@
252
253
  "key": "ios.runtime",
253
254
  "kind": "string",
254
255
  "scopes": [
256
+ "machine",
255
257
  "workspace",
256
258
  "repo",
257
259
  "committed"
@@ -357,6 +359,7 @@
357
359
  "key": "android.systemImage",
358
360
  "kind": "string",
359
361
  "scopes": [
362
+ "machine",
360
363
  "workspace",
361
364
  "repo",
362
365
  "committed"
@@ -486,14 +489,15 @@
486
489
  "type": "object",
487
490
  "properties": {
488
491
  "tunnel": {
489
- "description": "How a remote device reaches Metro",
492
+ "description": "How a remote device reaches Metro; tailscale is tailnet-only and requires explicit selection",
490
493
  "type": "string",
491
494
  "enum": [
492
495
  "auto",
493
496
  "off",
494
497
  "expo",
495
498
  "cloudflared",
496
- "ngrok"
499
+ "ngrok",
500
+ "tailscale"
497
501
  ],
498
502
  "default": "auto",
499
503
  "x-stim": {
@@ -532,6 +536,22 @@
532
536
  ]
533
537
  }
534
538
  },
539
+ "port": {
540
+ "description": "This workspace's Metro port, reserved instead of one Stim picks",
541
+ "type": "integer",
542
+ "minimum": 1024,
543
+ "maximum": 65535,
544
+ "x-stim": {
545
+ "key": "metro.port",
546
+ "kind": "number",
547
+ "scopes": [
548
+ "workspace",
549
+ "repo",
550
+ "committed"
551
+ ],
552
+ "env": "STIM_METRO_PORT"
553
+ }
554
+ },
535
555
  "warmupUrl": {
536
556
  "type": "object",
537
557
  "properties": {
@@ -582,6 +602,105 @@
582
602
  },
583
603
  "additionalProperties": false
584
604
  },
605
+ "devices": {
606
+ "type": "object",
607
+ "properties": {
608
+ "idleShutdownMinutes": {
609
+ "description": "Minutes an owned simulator or emulator stays idle before the workspace supervisor shuts it down; 0 never",
610
+ "type": "integer",
611
+ "minimum": 0,
612
+ "default": 0,
613
+ "x-stim": {
614
+ "key": "devices.idleShutdownMinutes",
615
+ "kind": "number",
616
+ "scopes": [
617
+ "machine",
618
+ "workspace",
619
+ "repo",
620
+ "committed"
621
+ ]
622
+ }
623
+ }
624
+ },
625
+ "additionalProperties": false
626
+ },
627
+ "macos": {
628
+ "type": "object",
629
+ "properties": {
630
+ "product": {
631
+ "description": "The Swift Package executable product stim macos builds in Debug.",
632
+ "type": "string",
633
+ "pattern": "^[A-Za-z0-9_-]+$",
634
+ "x-stim": {
635
+ "key": "macos.product",
636
+ "kind": "string",
637
+ "scopes": [
638
+ "workspace",
639
+ "repo",
640
+ "committed"
641
+ ]
642
+ }
643
+ },
644
+ "infoPlist": {
645
+ "description": "Development Info.plist relative to the Swift Package directory.",
646
+ "type": "string",
647
+ "x-stim": {
648
+ "key": "macos.infoPlist",
649
+ "kind": "path",
650
+ "scopes": [
651
+ "workspace",
652
+ "repo",
653
+ "committed"
654
+ ],
655
+ "relative": true
656
+ }
657
+ },
658
+ "arguments": {
659
+ "description": "Arguments passed directly to the owned macOS development executable.",
660
+ "type": "array",
661
+ "items": {
662
+ "type": "string"
663
+ },
664
+ "x-stim": {
665
+ "key": "macos.arguments",
666
+ "kind": "strings",
667
+ "scopes": [
668
+ "workspace",
669
+ "repo",
670
+ "committed"
671
+ ]
672
+ }
673
+ },
674
+ "assetCatalog": {
675
+ "description": "Optional .xcassets directory relative to the Swift Package directory.",
676
+ "type": "string",
677
+ "x-stim": {
678
+ "key": "macos.assetCatalog",
679
+ "kind": "path",
680
+ "scopes": [
681
+ "workspace",
682
+ "repo",
683
+ "committed"
684
+ ],
685
+ "relative": true
686
+ }
687
+ },
688
+ "resources": {
689
+ "description": "Resource destinations under Contents/Resources mapped to sources relative to the Swift Package directory.",
690
+ "type": "object",
691
+ "x-stim": {
692
+ "key": "macos.resources",
693
+ "kind": "object",
694
+ "scopes": [
695
+ "workspace",
696
+ "repo",
697
+ "committed"
698
+ ]
699
+ }
700
+ }
701
+ },
702
+ "additionalProperties": false
703
+ },
585
704
  "web": {
586
705
  "type": "object",
587
706
  "properties": {
@@ -934,9 +1053,57 @@
934
1053
  },
935
1054
  "additionalProperties": false
936
1055
  },
1056
+ "ios": {
1057
+ "type": "object",
1058
+ "properties": {
1059
+ "deviceType": {
1060
+ "description": "Simulator model for owned simulators",
1061
+ "type": "string",
1062
+ "x-stim": {
1063
+ "key": "ios.deviceType",
1064
+ "kind": "string",
1065
+ "scopes": [
1066
+ "machine",
1067
+ "workspace",
1068
+ "repo",
1069
+ "committed"
1070
+ ]
1071
+ }
1072
+ },
1073
+ "runtime": {
1074
+ "description": "iOS runtime owned simulators are created on",
1075
+ "type": "string",
1076
+ "x-stim": {
1077
+ "key": "ios.runtime",
1078
+ "kind": "string",
1079
+ "scopes": [
1080
+ "machine",
1081
+ "workspace",
1082
+ "repo",
1083
+ "committed"
1084
+ ]
1085
+ }
1086
+ }
1087
+ },
1088
+ "additionalProperties": false
1089
+ },
937
1090
  "android": {
938
1091
  "type": "object",
939
1092
  "properties": {
1093
+ "systemImage": {
1094
+ "description": "SDK system image for owned AVDs",
1095
+ "type": "string",
1096
+ "x-stim": {
1097
+ "key": "android.systemImage",
1098
+ "kind": "string",
1099
+ "scopes": [
1100
+ "machine",
1101
+ "workspace",
1102
+ "repo",
1103
+ "committed"
1104
+ ]
1105
+ }
1106
+ },
940
1107
  "deviceProfile": {
941
1108
  "description": "avdmanager hardware profile id for new owned AVDs",
942
1109
  "type": "string",
@@ -955,6 +1122,49 @@
955
1122
  },
956
1123
  "additionalProperties": false
957
1124
  },
1125
+ "devices": {
1126
+ "type": "object",
1127
+ "properties": {
1128
+ "idleShutdownMinutes": {
1129
+ "description": "Minutes an owned simulator or emulator stays idle before the workspace supervisor shuts it down; 0 never",
1130
+ "type": "integer",
1131
+ "minimum": 0,
1132
+ "default": 0,
1133
+ "x-stim": {
1134
+ "key": "devices.idleShutdownMinutes",
1135
+ "kind": "number",
1136
+ "scopes": [
1137
+ "machine",
1138
+ "workspace",
1139
+ "repo",
1140
+ "committed"
1141
+ ]
1142
+ }
1143
+ }
1144
+ },
1145
+ "additionalProperties": false
1146
+ },
1147
+ "recording": {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "enabled": {
1151
+ "description": "Let stim-server record device screens for replay; false stops it and deletes the recordings",
1152
+ "type": "boolean",
1153
+ "default": true,
1154
+ "x-stim": {
1155
+ "key": "recording.enabled",
1156
+ "kind": "boolean",
1157
+ "scopes": [
1158
+ "machine",
1159
+ "workspace",
1160
+ "repo"
1161
+ ],
1162
+ "env": "STIM_RECORDING"
1163
+ }
1164
+ }
1165
+ },
1166
+ "additionalProperties": false
1167
+ },
958
1168
  "iosSimulatorApp": {
959
1169
  "description": "App that displays an owned iOS simulator; stim-desktop by default when Stim Desktop is installed",
960
1170
  "type": "string",
@@ -1136,6 +1346,151 @@
1136
1346
  },
1137
1347
  "additionalProperties": false
1138
1348
  },
1349
+ "hosting": {
1350
+ "type": "object",
1351
+ "properties": {
1352
+ "machines": {
1353
+ "description": "Tailscale names of the Macs that may host owned simulator sessions for this one, each optionally with :<port> of its tailscale serve route (default 7443); doctor --fix asks for separate device-host approval",
1354
+ "type": "array",
1355
+ "items": {
1356
+ "type": "string"
1357
+ },
1358
+ "x-stim": {
1359
+ "key": "hosting.machines",
1360
+ "kind": "strings",
1361
+ "scopes": [
1362
+ "machine"
1363
+ ]
1364
+ }
1365
+ },
1366
+ "agentDriver": {
1367
+ "description": "Tool this Mac starts so a client's coding agent can drive the macOS apps it hosts for that client; none starts nothing",
1368
+ "type": "string",
1369
+ "enum": [
1370
+ "none",
1371
+ "agent-device"
1372
+ ],
1373
+ "default": "none",
1374
+ "x-stim": {
1375
+ "key": "hosting.agentDriver",
1376
+ "kind": "choice",
1377
+ "scopes": [
1378
+ "machine"
1379
+ ]
1380
+ }
1381
+ }
1382
+ },
1383
+ "additionalProperties": false
1384
+ },
1385
+ "server": {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "acceptClientBuilds": {
1389
+ "description": "Whether a Mac approved for builds or device hosting here may update this Mac's stim-server service to that Mac's own stim-server build; releases from npm need no setting",
1390
+ "type": "boolean",
1391
+ "default": false,
1392
+ "x-stim": {
1393
+ "key": "server.acceptClientBuilds",
1394
+ "kind": "boolean",
1395
+ "scopes": [
1396
+ "machine"
1397
+ ]
1398
+ }
1399
+ }
1400
+ },
1401
+ "additionalProperties": false
1402
+ },
1403
+ "offload": {
1404
+ "type": "object",
1405
+ "properties": {
1406
+ "machines": {
1407
+ "description": "Tailscale names of the Macs that may build for this one, each optionally with :<port> of its tailscale serve route (default 7443)",
1408
+ "type": "array",
1409
+ "items": {
1410
+ "type": "string"
1411
+ },
1412
+ "x-stim": {
1413
+ "key": "offload.machines",
1414
+ "kind": "strings",
1415
+ "scopes": [
1416
+ "machine"
1417
+ ]
1418
+ }
1419
+ },
1420
+ "machine": {
1421
+ "description": "Build placement: auto follows offload.mode with local fallback; local always builds here; a name in offload.machines requires that machine without fallback. The ios, android and macos --build-machine flag overrides this setting and its environment override",
1422
+ "type": "string",
1423
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1424
+ "default": "auto",
1425
+ "x-stim": {
1426
+ "key": "offload.machine",
1427
+ "kind": "string",
1428
+ "scopes": [
1429
+ "machine"
1430
+ ],
1431
+ "env": "STIM_OFFLOAD_MACHINE"
1432
+ }
1433
+ },
1434
+ "mode": {
1435
+ "description": "When offload.machine is auto, where iOS simulator Debug, Android emulator debug and macOS SwiftPM Debug builds run: auto builds here while this Mac has a free concurrency.maxBuilds slot and its load is under offload.maxLoadPerCore, and otherwise offloads to a less loaded machine in offload.machines; force offloads whenever a machine can take the build; off always builds here",
1436
+ "type": "string",
1437
+ "enum": [
1438
+ "auto",
1439
+ "force",
1440
+ "off"
1441
+ ],
1442
+ "default": "auto",
1443
+ "x-stim": {
1444
+ "key": "offload.mode",
1445
+ "kind": "choice",
1446
+ "scopes": [
1447
+ "machine"
1448
+ ],
1449
+ "env": "STIM_OFFLOAD_MODE"
1450
+ }
1451
+ },
1452
+ "maxLoadPerCore": {
1453
+ "description": "Load per core (5-minute load average divided by the CPU count) at which a Mac counts as saturated: a build machine declines offloaded builds, and auto offload stops preferring this Mac",
1454
+ "type": "number",
1455
+ "minimum": 0.1,
1456
+ "default": 2,
1457
+ "x-stim": {
1458
+ "key": "offload.maxLoadPerCore",
1459
+ "kind": "number",
1460
+ "scopes": [
1461
+ "machine"
1462
+ ]
1463
+ }
1464
+ },
1465
+ "workerRoot": {
1466
+ "description": "Directory where stim-server keeps the checkouts, dependencies and build state of Macs that build here; default $STIM_HOME/build-worker",
1467
+ "type": "string",
1468
+ "x-stim": {
1469
+ "key": "offload.workerRoot",
1470
+ "kind": "path",
1471
+ "scopes": [
1472
+ "machine"
1473
+ ],
1474
+ "absolute": true
1475
+ }
1476
+ },
1477
+ "gradleDaemonIdleMinutes": {
1478
+ "description": "Minutes the Gradle daemon of an offloaded Android build stays warm on this build machine after the build; 0 stops it when the build ends",
1479
+ "type": "integer",
1480
+ "minimum": 0,
1481
+ "maximum": 35791,
1482
+ "default": 30,
1483
+ "x-stim": {
1484
+ "key": "offload.gradleDaemonIdleMinutes",
1485
+ "kind": "number",
1486
+ "scopes": [
1487
+ "machine"
1488
+ ]
1489
+ }
1490
+ }
1491
+ },
1492
+ "additionalProperties": false
1493
+ },
1139
1494
  "caches": {
1140
1495
  "type": "object",
1141
1496
  "properties": {
@@ -1,14 +1,13 @@
1
- import { A as ownership_claim_exports, B as deviceSlotPlatforms, O as process_identity_exports, U as projectDeviceSlots, _ as loadConfig, d as getConfigDir } from "./config-0jCcMM0E.mjs";
2
- import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
1
+ import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
+ import { d as getConfigDir } from "./config-D0DbpZtM.mjs";
3
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
3
4
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-CL9dZf73.mjs";
5
- import { D as listAdbDevices } from "./android-qx_31wJo.mjs";
6
- import { g as parseRuntimeVersion, l as listAllIosSims, s as iosRuntimeMatches } from "./ios-CmEzZiOj.mjs";
7
- import { f as resolveEasCliBin } from "./remote-cache--aehr4Pr.mjs";
8
- import { O as easCliSupport, k as easCliUpgradeRemedy, s as readInstalledEasCliVersion } from "./device-remote-DT9ngZiD.mjs";
5
+ import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-W5Pi1q38.mjs";
6
+ import { f as resolveEasCliBin } from "./remote-cache-CO2elm_b.mjs";
7
+ import { _ as easCliSupport, s as readInstalledEasCliVersion, v as easCliUpgradeRemedy } from "./device-remote-9ulPsdhY.mjs";
8
+ import { createHash } from "node:crypto";
9
9
  import { existsSync, realpathSync, statSync } from "node:fs";
10
10
  import { join } from "node:path";
11
- import { createHash } from "node:crypto";
12
11
  //#region src/engine/eas-build.ts
13
12
  const MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION = "18.9.0";
14
13
  function isEasBuildFailure(result) {
@@ -229,129 +228,6 @@ async function resolveEasDevelopmentBuild(args) {
229
228
  }
230
229
  }
231
230
  //#endregion
232
- //#region src/engine/device-capacity.ts
233
- function liveOwnedDeviceCount({ sims = [], adbEmulators = [], config = null } = {}) {
234
- let count = 0;
235
- for (const sim of sims) if (sim?.state === "Booted" && sim.name?.startsWith("stim-")) count++;
236
- const livePorts = new Set(adbEmulators.map((e) => e.consolePort));
237
- for (const proj of Object.values(config?.projects || {})) for (const { platforms } of projectDeviceSlots(proj)) {
238
- const android = platforms.android;
239
- if (android?.owned && android.avdName && typeof android.consolePort === "number" && livePorts.has(android.consolePort)) count++;
240
- }
241
- return count;
242
- }
243
- function workspaceHasLiveDevice({ platform, project, slot = "default", sims = [], adbEmulators = [] } = {}) {
244
- if (!platform) return false;
245
- const record = deviceSlotPlatforms(project, slot)?.[platform];
246
- if (!record) return false;
247
- if (platform === "ios") return sims.some((s) => s.udid === record.deviceUdid && s.state === "Booted");
248
- return typeof record.consolePort === "number" && adbEmulators.some((e) => e.consolePort === record.consolePort);
249
- }
250
- function deviceCapacityRefusal({ platform, project, slot = "default", max, sims = [], adb = null, config = null } = {}) {
251
- if (!max || max <= 0) return null;
252
- const adbEmulators = adb?.emulators || [];
253
- if (workspaceHasLiveDevice({
254
- platform,
255
- project,
256
- slot,
257
- sims,
258
- adbEmulators
259
- })) return null;
260
- const count = liveOwnedDeviceCount({
261
- sims,
262
- adbEmulators,
263
- config
264
- });
265
- if (count < max) return null;
266
- return {
267
- code: "STIM_AT_CAPACITY",
268
- message: `${count} Stim device(s) are already booted and concurrency.maxDevices is ${max}, so booting another would exceed the cap.`,
269
- remedy: "stop an environment (stim stop) or raise concurrency.maxDevices"
270
- };
271
- }
272
- function checkDeviceCapacity({ platform, project, slot = "default", max, sims = listAllIosSims, adb = listAdbDevices, config = loadConfig } = {}) {
273
- if (!max || max <= 0) return null;
274
- let simList = [];
275
- let adbRes = {
276
- emulators: [],
277
- physical: [],
278
- unhealthy: []
279
- };
280
- try {
281
- simList = typeof sims === "function" ? sims() || [] : sims || [];
282
- } catch {}
283
- try {
284
- adbRes = typeof adb === "function" ? adb() || adbRes : adb || adbRes;
285
- } catch {}
286
- let cfg = null;
287
- try {
288
- cfg = typeof config === "function" ? config() : config ?? null;
289
- } catch {}
290
- return deviceCapacityRefusal({
291
- platform,
292
- project,
293
- slot,
294
- max,
295
- sims: simList,
296
- adb: adbRes,
297
- config: cfg
298
- });
299
- }
300
- function deviceTypeMismatch(recordedTypeId, requestedName, deviceTypes) {
301
- if (!requestedName || !recordedTypeId) return null;
302
- const wanted = (deviceTypes || []).find((d) => d.name === requestedName);
303
- if (!wanted) return null;
304
- if (wanted.identifier === recordedTypeId) return null;
305
- const recorded = (deviceTypes || []).find((d) => d.identifier === recordedTypeId);
306
- return `this project's sim is ${recorded ? recorded.name : recordedTypeId}, but --device-type asked for ${requestedName}`;
307
- }
308
- function runtimeMismatch(recordedRuntimeId, requested, runtimes) {
309
- if (!requested || !recordedRuntimeId) return null;
310
- const wanted = runtimes.find((r) => iosRuntimeMatches(r, requested));
311
- if (!wanted || wanted.identifier === recordedRuntimeId) return null;
312
- return `this project's sim runs iOS ${parseRuntimeVersion(recordedRuntimeId)}, but --runtime asked for ${requested}`;
313
- }
314
- function installedNames(names) {
315
- const unique = [...new Set(names.filter((n) => typeof n === "string" && n !== ""))];
316
- return unique.length > 0 ? unique.join(", ") : "none";
317
- }
318
- function unknownIosRuntimeRefusal(requested, runtimes) {
319
- if (!requested) return null;
320
- if ((runtimes || []).some((r) => iosRuntimeMatches(r, requested))) return null;
321
- return {
322
- message: `No installed simulator runtime matches "${requested}". Installed runtimes: ${installedNames((runtimes || []).map((r) => r.version))}.`,
323
- remedy: "Pass `--runtime` (or set ios.runtime) a version printed above (\"26.5\") or a runtime's full name (\"iOS 26.5\"); nothing else matches. Install more runtimes through Xcode."
324
- };
325
- }
326
- function creatableIosDeviceTypeNames(runtimes, runtime) {
327
- return (runtime ? (runtimes || []).filter((r) => iosRuntimeMatches(r, runtime)) : runtimes || []).flatMap((r) => (r.supportedDeviceTypes || []).map((d) => d.name));
328
- }
329
- function unknownIosDeviceTypeRefusal(requested, runtimes, runtime) {
330
- if (!requested) return null;
331
- const creatable = creatableIosDeviceTypeNames(runtimes, runtime);
332
- if (creatable.includes(requested)) return null;
333
- return {
334
- message: `No device type named "${requested}" can be created on ${runtime ? `runtime ${runtime}` : "any installed simulator runtime"}. ${runtime ? `Device types runtime ${runtime} supports` : "Device types the installed runtimes support"}: ${installedNames(creatable)}.`,
335
- remedy: "Pass `--device-type` (or set ios.deviceType) one of the names printed above, exactly as `xcrun simctl list devicetypes` spells it. `xcrun simctl list devicetypes` also lists watchOS, tvOS and visionOS models, which no iOS runtime can create. Install more models through Xcode."
336
- };
337
- }
338
- function unknownAndroidSystemImageRefusal(requested, images) {
339
- if (!requested) return null;
340
- if ((images || []).some((i) => i.pkg === requested)) return null;
341
- return {
342
- message: `No installed Android system image is named "${requested}". Installed system images: ${installedNames((images || []).map((i) => i.pkg))}.`,
343
- remedy: "Pass `--system-image` (or set android.systemImage) to one of the package ids printed above. Install more with `sdkmanager \"system-images;android-36;google_apis;arm64-v8a\"`."
344
- };
345
- }
346
- function unknownAndroidDeviceProfileRefusal(requested, profiles) {
347
- if (!requested) return null;
348
- if (profiles.includes(requested)) return null;
349
- return {
350
- message: `No Android hardware profile is named "${requested}". Profiles avdmanager offers: ${installedNames(profiles)}.`,
351
- remedy: "Pass `--device-profile` (or set android.deviceProfile) to one of the ids printed above, exactly as `avdmanager list device -c` spells it, e.g. \"pixel_fold\" or \"pixel_tablet\"."
352
- };
353
- }
354
- //#endregion
355
231
  //#region src/engine/simslim.ts
356
232
  async function reconcileSimSlim({ udid, profile, previouslyManaged = false, out = () => {}, spawn, timeoutMs = 72e4, cleanupMs = 1e4 }) {
357
233
  if (!profile && !previouslyManaged) return {
@@ -495,4 +371,4 @@ function simslimIsOnPath() {
495
371
  }
496
372
  }
497
373
  //#endregion
498
- export { liveOwnedDeviceCount as a, unknownAndroidSystemImageRefusal as c, MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION as d, easDeviceBuildRemedy as f, resolveEasDevelopmentBuild as h, deviceTypeMismatch as i, unknownIosDeviceTypeRefusal as l, planEasDevelopmentBuild as m, simslimIsOnPath as n, runtimeMismatch as o, isEasBuildFailure as p, checkDeviceCapacity as r, unknownAndroidDeviceProfileRefusal as s, reconcileSimSlim as t, unknownIosRuntimeRefusal as u };
374
+ export { isEasBuildFailure as a, easDeviceBuildRemedy as i, simslimIsOnPath as n, planEasDevelopmentBuild as o, MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION as r, resolveEasDevelopmentBuild as s, reconcileSimSlim as t };
@@ -0,0 +1,65 @@
1
+ import { B as parseDeviceSlotKey, H as projectDeviceSlots, p as getProject } from "./config-D0DbpZtM.mjs";
2
+ import { r as readWorkspaceState } from "./workspace-state-CL2V2Ons.mjs";
3
+ import { n as fileLeaseIo } from "./device-lease-W5Pi1q38.mjs";
4
+ import { E as getAvdNameForSerial, O as listAdbDevices } from "./android-Db2eEMaf.mjs";
5
+ import { u as listAllIosSims } from "./ios-3CtCRhwr.mjs";
6
+ import { f as deviceShellArg } from "./app-install-CAAplXAt.mjs";
7
+ //#region src/engine/slot-launch.ts
8
+ function launchSlotScope(root, slot = "default") {
9
+ if (slot !== "default") return slot;
10
+ if (Object.keys(getProject(root)?.deviceSlots ?? {}).length) return slot;
11
+ const state = readWorkspaceState(root);
12
+ if (Object.keys({
13
+ ...state?.collectors,
14
+ ...fileLeaseIo.readHolder(root)
15
+ }).some((key) => key.includes(":"))) return slot;
16
+ }
17
+ const DEVICE_LISTING_TIMEOUT_MS = 5e3;
18
+ function ownedDeviceRunning(platform) {
19
+ let listing = null;
20
+ const list = () => {
21
+ if (platform === "android") {
22
+ const { emulators, unhealthy } = listAdbDevices({ timeoutMs: DEVICE_LISTING_TIMEOUT_MS });
23
+ const names = [];
24
+ for (const entry of [...emulators, ...unhealthy.filter((candidate) => candidate.kind === "emulator")]) {
25
+ const name = getAvdNameForSerial(entry.serial, { timeoutMs: DEVICE_LISTING_TIMEOUT_MS });
26
+ if (name === null) return () => true;
27
+ names.push(name);
28
+ }
29
+ return (device) => typeof device.avdName === "string" && names.includes(device.avdName);
30
+ }
31
+ const booted = new Set(listAllIosSims({ timeoutMs: DEVICE_LISTING_TIMEOUT_MS }).filter((sim) => sim.state === "Booted").map((sim) => sim.udid));
32
+ return (device) => typeof device.deviceUdid === "string" && booted.has(device.deviceUdid);
33
+ };
34
+ return (device) => {
35
+ try {
36
+ listing ??= list();
37
+ return listing(device);
38
+ } catch {
39
+ listing = () => true;
40
+ return true;
41
+ }
42
+ };
43
+ }
44
+ function siblingPlatformSlots(root, platform, slot = "default", { deviceRunning = ownedDeviceRunning(platform) } = {}) {
45
+ const slots = /* @__PURE__ */ new Set();
46
+ const state = readWorkspaceState(root);
47
+ for (const key of Object.keys({
48
+ ...state?.collectors,
49
+ ...fileLeaseIo.readHolder(root)
50
+ })) {
51
+ const parsed = parseDeviceSlotKey(key);
52
+ if (parsed?.platform === platform) slots.add(parsed.slot);
53
+ }
54
+ for (const { slot: other, platforms } of projectDeviceSlots(getProject(root))) {
55
+ const device = platforms[platform];
56
+ if (other !== slot && !slots.has(other) && device && deviceRunning(device)) slots.add(other);
57
+ }
58
+ slots.delete(slot);
59
+ return [...slots].toSorted();
60
+ }
61
+ function nativeRunCommand(platform, slot = "default", { physical, deviceId } = {}) {
62
+ return `stim ${platform}${slot === "default" ? "" : ` --slot ${slot}`}${physical && deviceId ? ` --device ${deviceShellArg(deviceId)}` : ""}`;
63
+ }
64
+ //#endregion
65
+ export { nativeRunCommand as n, siblingPlatformSlots as r, launchSlotScope as t };
@@ -1,4 +1,4 @@
1
- import { A as ownership_claim_exports, O as process_identity_exports } from "./config-0jCcMM0E.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
2
2
  //#region src/engine/spawn-claims.ts
3
3
  const declaring = /* @__PURE__ */ new Set();
4
4
  const running = /* @__PURE__ */ new Set();
@@ -0,0 +1,16 @@
1
+ import { basename, dirname, join } from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ //#region src/spawn-entry.ts
4
+ const DEV_ENTRIES = {
5
+ "supervisor-run": "./supervisor/run.ts",
6
+ "collector-run": "./collector/run.ts",
7
+ "web-run": "./web/run.ts",
8
+ "macos-run": "./macos/run.ts"
9
+ };
10
+ function spawnEntry(name) {
11
+ const here = fileURLToPath(import.meta.url);
12
+ if (basename(dirname(here)) === "src") return fileURLToPath(new URL(DEV_ENTRIES[name], import.meta.url));
13
+ return join(dirname(here), `${name}.mjs`);
14
+ }
15
+ //#endregion
16
+ export { spawnEntry as t };