sootsim 0.1.175 → 0.1.177

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 (153) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-A4WFJEFV.js → agent-3BCITLIZ.js} +3 -3
  3. package/dist-cli/chunks/{agent-wrapper-EOZBE6UT.js → agent-wrapper-26RIZVGD.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-H2I7IV7N.js → app-fonts-JVDHATQE.js} +2 -2
  5. package/dist-cli/chunks/{assert-36QXQUCE.js → assert-IT2OXM4Y.js} +2 -2
  6. package/dist-cli/chunks/beta-SPH73CAA.js +2 -0
  7. package/dist-cli/chunks/{camera-7HK2Y3PY.js → camera-ZYVEUCIO.js} +2 -2
  8. package/dist-cli/chunks/{chunk-2QTAUBZX.js → chunk-3L6I2M2Z.js} +3 -3
  9. package/dist-cli/chunks/chunk-4INGTBO7.js +4 -0
  10. package/dist-cli/chunks/{chunk-EEIUS5AS.js → chunk-4JESO36F.js} +4 -4
  11. package/dist-cli/chunks/{chunk-HWUFW3IP.js → chunk-4YNKFN2A.js} +2 -2
  12. package/dist-cli/chunks/{chunk-V7AGBG2P.js → chunk-52O56BTW.js} +2 -2
  13. package/dist-cli/chunks/{chunk-ZZWAHZ37.js → chunk-64QAFSY7.js} +1 -1
  14. package/dist-cli/chunks/{chunk-OMJ2DTQJ.js → chunk-65ZBQDQM.js} +2 -2
  15. package/dist-cli/chunks/{chunk-DV6SWCY7.js → chunk-A2WASN2L.js} +1 -1
  16. package/dist-cli/chunks/{chunk-H2J4Z7LY.js → chunk-A3VHHWLU.js} +2 -2
  17. package/dist-cli/chunks/{chunk-UMJDCX2P.js → chunk-AN4DM7IB.js} +2 -2
  18. package/dist-cli/chunks/{chunk-5QLWXLML.js → chunk-ATVKVVHZ.js} +2 -2
  19. package/dist-cli/chunks/chunk-B6GISAUX.js +1 -0
  20. package/dist-cli/chunks/{chunk-P2WO5LMI.js → chunk-BTTZN2SN.js} +2 -2
  21. package/dist-cli/chunks/{chunk-LYZXARZO.js → chunk-C5QOGCVN.js} +2 -2
  22. package/dist-cli/chunks/{chunk-RCPMRHTK.js → chunk-CH3MWM5W.js} +1 -1
  23. package/dist-cli/chunks/{chunk-7F2LH7U5.js → chunk-CHTYIQLE.js} +2 -2
  24. package/dist-cli/chunks/{chunk-SV3SRWN5.js → chunk-CUO7F2JE.js} +1 -1
  25. package/dist-cli/chunks/{chunk-YMBQBKKA.js → chunk-D2BBJUEY.js} +1 -1
  26. package/dist-cli/chunks/chunk-DGDBEXXQ.js +1 -0
  27. package/dist-cli/chunks/{chunk-3SUIAUIY.js → chunk-IBSEFPPL.js} +1 -1
  28. package/dist-cli/chunks/{chunk-ZPQY5DBY.js → chunk-JFLNZGDS.js} +2 -2
  29. package/dist-cli/chunks/{chunk-4UATZVHM.js → chunk-JHYLPDCC.js} +2 -2
  30. package/dist-cli/chunks/{chunk-XDDO46ZW.js → chunk-JS3NH2SJ.js} +1 -1
  31. package/dist-cli/chunks/{chunk-UXZRHPX6.js → chunk-JS7SSYDG.js} +2 -2
  32. package/dist-cli/chunks/{chunk-HWJ52K4J.js → chunk-JXO6UPGI.js} +1 -1
  33. package/dist-cli/chunks/{chunk-MLLINRL2.js → chunk-LTZPVG65.js} +1 -1
  34. package/dist-cli/chunks/{chunk-GJQGKFLY.js → chunk-NOLQYF76.js} +1 -1
  35. package/dist-cli/chunks/{chunk-2J67UJXT.js → chunk-NYGESF6F.js} +1 -1
  36. package/dist-cli/chunks/{chunk-QK76RK6J.js → chunk-NZWTC6K6.js} +1 -1
  37. package/dist-cli/chunks/{chunk-NPZPBSZD.js → chunk-PAU64XFG.js} +1 -1
  38. package/dist-cli/chunks/{chunk-IKJSGKUB.js → chunk-PL3ALTWB.js} +2 -2
  39. package/dist-cli/chunks/{chunk-ZG2A6LCL.js → chunk-QWZFOMCI.js} +2 -2
  40. package/dist-cli/chunks/{chunk-Y3OHYOFS.js → chunk-SNLUVL3H.js} +2 -2
  41. package/dist-cli/chunks/{chunk-KSF72FPP.js → chunk-SU3JJ7ER.js} +2 -2
  42. package/dist-cli/chunks/{chunk-XBK3XAKL.js → chunk-TVFHGWTW.js} +2 -2
  43. package/dist-cli/chunks/{chunk-JCQEG4R6.js → chunk-UBJQDMDG.js} +2 -2
  44. package/dist-cli/chunks/{chunk-VW643HG5.js → chunk-UJN3FMEX.js} +2 -2
  45. package/dist-cli/chunks/chunk-WKG5J4RD.js +2 -0
  46. package/dist-cli/chunks/{chunk-IISA6UXR.js → chunk-WRHJEI7Y.js} +1 -1
  47. package/dist-cli/chunks/{chunk-4UGD4KJM.js → chunk-WUEKKZ7Z.js} +2 -2
  48. package/dist-cli/chunks/{chunk-5D4PHINP.js → chunk-Y2637KG7.js} +1 -1
  49. package/dist-cli/chunks/chunk-YU6CNUJD.js +2 -0
  50. package/dist-cli/chunks/{chunk-46S56FJJ.js → chunk-YVDSGGOT.js} +1 -1
  51. package/dist-cli/chunks/{chunk-WM73SGMM.js → chunk-Z4IMGLHM.js} +2 -2
  52. package/dist-cli/chunks/{chunk-4PQ36DTJ.js → chunk-ZUTVEJVA.js} +3 -3
  53. package/dist-cli/chunks/cli-version-HENS6BZI.js +2 -0
  54. package/dist-cli/chunks/{compat-KWM6HXJD.js → compat-MNTQH57R.js} +3 -3
  55. package/dist-cli/chunks/{control-PVZRPH57.js → control-WQ7XEPCI.js} +2 -2
  56. package/dist-cli/chunks/{cpu-profile-3YLLRNVG.js → cpu-profile-P27HBXOI.js} +2 -2
  57. package/dist-cli/chunks/daemon-WUAZELEI.js +2 -0
  58. package/dist-cli/chunks/{debug-TD4EVFT7.js → debug-ES4A3SZQ.js} +3 -3
  59. package/dist-cli/chunks/{detox-S7M5WN3L.js → detox-Q36B2553.js} +2 -2
  60. package/dist-cli/chunks/{device-WR7GA4RN.js → device-NA7TB4E6.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-JZMNR25X.js → diagnose-DKW5WI3X.js} +2 -2
  62. package/dist-cli/chunks/drivers-RFOOGIRC.js +2 -0
  63. package/dist-cli/chunks/{electron-V2YDDVKJ.js → electron-6C2VDAZW.js} +3 -3
  64. package/dist-cli/chunks/flow-GSHP52QS.js +2 -0
  65. package/dist-cli/chunks/help-J6PF4PZX.js +2 -0
  66. package/dist-cli/chunks/{hints-OK373YOJ.js → hints-W7ZZ6KZE.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-IFY5UTLL.js → home-paths-K4347S7C.js} +2 -2
  68. package/dist-cli/chunks/{inspect-LRIJ7MQT.js → inspect-ZPHNFMEX.js} +4 -4
  69. package/dist-cli/chunks/{install-desktop-ESQL2Q2T.js → install-desktop-ZCCPJMOF.js} +3 -3
  70. package/dist-cli/chunks/{keys-IHG2YEL3.js → keys-XM67H4SM.js} +2 -2
  71. package/dist-cli/chunks/{login-CYIWYJGG.js → login-O4OGJKYL.js} +4 -4
  72. package/dist-cli/chunks/{logout-NALFLZWI.js → logout-DWCBRMLM.js} +2 -2
  73. package/dist-cli/chunks/{maestro-QKSXVPWG.js → maestro-MEWENIGQ.js} +2 -2
  74. package/dist-cli/chunks/optional-demo-registry-O3XS3WXJ.js +2 -0
  75. package/dist-cli/chunks/{preview-XCQGBN2I.js → preview-VPWG4462.js} +2 -2
  76. package/dist-cli/chunks/{profile-RDAPVU7K.js → profile-R4CSGXYJ.js} +2 -2
  77. package/dist-cli/chunks/{react-MM373YNE.js → react-5LFUOYV5.js} +2 -2
  78. package/dist-cli/chunks/{record-SQA376Z7.js → record-MHAAYOWF.js} +2 -2
  79. package/dist-cli/chunks/runtime-R2PRKIZM.js +2 -0
  80. package/dist-cli/chunks/{screenshot-FCKW6JV6.js → screenshot-XAEO7EBF.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-QVRUJXZ3.js → screenshot-mode-QNR5ESKN.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-ITBCSBZS.js → screenshots-Z6OSENKY.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-capture-H4EAYFH3.js → screenshots-capture-3DJPYJUD.js} +2 -2
  84. package/dist-cli/chunks/{serve-3GHYSGJR.js → serve-IVTQFOFI.js} +16 -16
  85. package/dist-cli/chunks/{setup-ME5SRHWD.js → setup-AMRSL4IK.js} +2 -2
  86. package/dist-cli/chunks/{skills-E5JE3SAI.js → skills-K4DG2CIH.js} +2 -2
  87. package/dist-cli/chunks/{slides-D37ML4LI.js → slides-UIH7KXFR.js} +2 -2
  88. package/dist-cli/chunks/store-2JY2VLVA.js +2 -0
  89. package/dist-cli/chunks/telemetry-KNKROOT5.js +2 -0
  90. package/dist-cli/chunks/{test-CWWQJG5K.js → test-XUJ2V5ZX.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-WESGARG5.js → three-mode-P6HSLJMD.js} +2 -2
  92. package/dist-cli/chunks/{timeline-RUVZASG4.js → timeline-YSUY4PHV.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-DKWD6TSY.js → upgrade-YZMDFQIH.js} +2 -2
  94. package/dist-cli/chunks/upload-TIH2LID6.js +2 -0
  95. package/dist-cli/chunks/{version-G45RLONC.js → version-5QAMZ5CK.js} +2 -2
  96. package/dist-cli/chunks/{web-X2HCJQQE.js → web-LM3JSBQF.js} +2 -2
  97. package/dist-cli/chunks/{what-happened-5DBVOXKC.js → what-happened-NYVQ7KER.js} +2 -2
  98. package/dist-cli/chunks/{whoami-ZDT3RQOC.js → whoami-AAHH72FM.js} +2 -2
  99. package/dist-lib/agent-daemon-client.cjs +10 -1
  100. package/dist-lib/agent-events.cjs +1 -1
  101. package/dist-lib/agent-sessions.cjs +1 -1
  102. package/dist-lib/attached-projects.cjs +1 -1
  103. package/dist-lib/auth/shared-session.cjs +1 -1
  104. package/dist-lib/backend-origin.cjs +1 -1
  105. package/dist-lib/beta.cjs +1 -1
  106. package/dist-lib/beta.mjs +1 -1
  107. package/dist-lib/bridge-constants.cjs +7 -1
  108. package/dist-lib/cli-constants.cjs +1 -1
  109. package/dist-lib/config.cjs +1 -1
  110. package/dist-lib/detox/index.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +1 -1
  113. package/dist-lib/host/bridge-host.cjs +126 -12
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/websocket-proxy.cjs +1 -1
  118. package/dist-lib/index.cjs +1 -1
  119. package/dist-lib/jump-to-source-babel.cjs +1 -1
  120. package/dist-lib/menu.cjs +1 -1
  121. package/dist-lib/menu.mjs +1 -1
  122. package/dist-lib/metro.cjs +1 -1
  123. package/dist-lib/profiles.cjs +1 -1
  124. package/dist-lib/render-mode.cjs +1 -1
  125. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  126. package/dist-lib/sdk.cjs +1 -1
  127. package/dist-lib/sdk.mjs +1 -1
  128. package/dist-lib/skills.cjs +237 -102
  129. package/dist-lib/vite.cjs +1 -1
  130. package/package.json +7 -1
  131. package/src/agent-daemon-client.ts +13 -0
  132. package/src/agent-identity.ts +21 -0
  133. package/src/agentbus-prompt.ts +80 -0
  134. package/src/bridge-constants.ts +9 -0
  135. package/src/host/agent-host.ts +42 -0
  136. package/src/host/bridge-host.ts +14 -1
  137. package/src/native-seam-manifest.ts +11 -0
  138. package/dist-cli/chunks/beta-7FRVMDBH.js +0 -2
  139. package/dist-cli/chunks/chunk-3G5EE3ST.js +0 -2
  140. package/dist-cli/chunks/chunk-HCKTFQLK.js +0 -2
  141. package/dist-cli/chunks/chunk-ODISDSXU.js +0 -1
  142. package/dist-cli/chunks/chunk-RAESCYIA.js +0 -4
  143. package/dist-cli/chunks/chunk-URQSBUTU.js +0 -1
  144. package/dist-cli/chunks/cli-version-HCYSKPJO.js +0 -2
  145. package/dist-cli/chunks/daemon-2DT4QAJ4.js +0 -2
  146. package/dist-cli/chunks/drivers-UMQTPEMU.js +0 -2
  147. package/dist-cli/chunks/flow-CKXTFJJ7.js +0 -2
  148. package/dist-cli/chunks/help-OEMLUQMD.js +0 -2
  149. package/dist-cli/chunks/optional-demo-registry-CIEW2ET7.js +0 -2
  150. package/dist-cli/chunks/runtime-CUNVH66R.js +0 -2
  151. package/dist-cli/chunks/store-UW5HH6DW.js +0 -2
  152. package/dist-cli/chunks/telemetry-KSBNWXNE.js +0 -2
  153. package/dist-cli/chunks/upload-LYANGCPB.js +0 -2
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},f={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},c={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},r=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:f}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:c},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function w(e){return h[e]}function g(){return Object.keys(h)}var i={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},x={color:"#25c3ec",blur:120,spread:52,opacity:.34},v="iphone-17-pro";var b=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],m=Object.fromEntries(b.map(e=>[e.name,e.value]));function B(e){return m[e]??m.gray}function I(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:null}function y(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function T(e){return Object.prototype.hasOwnProperty.call(s,e)?y(s[e]):null}var d={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(i),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function S(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),a=n.get("device");a&&d.deviceModel.options?.includes(a)&&(e.deviceModel=a);let l=n.get("colorScheme")??n.get("theme");l&&d.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function N(){let e={};for(let[n,a]of Object.entries(d))e[n]=a.default;return Object.assign(e,S()),e}export{x as a,v as b,B as c,I as d,y as e,T as f,h as g,w as h,g as i,d as j,S as k,N as l};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
3
3
  `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
4
4
  run: bun run --cwd packages/sootsim-engine build:electron-main
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-IISA6UXR.js";import{o as D}from"./chunk-3SUIAUIY.js";import{a as T}from"./chunk-ZZWAHZ37.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import h from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function y(){return _()}function U(){return h.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=h.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function he(){return S().attachedProjects}var Q=336*60*60*1e3;function ye(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-CIEW2ET7.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=h.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(y(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(y(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),x=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=V(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R}from"./chunk-WRHJEI7Y.js";import{o as D}from"./chunk-IBSEFPPL.js";import{a as T}from"./chunk-64QAFSY7.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import h from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function y(){return _()}function U(){return h.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=h.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function he(){return S().attachedProjects}var Q=336*60*60*1e3;function ye(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-O3XS3WXJ.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=h.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(y(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(y(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),x=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=V(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
3
3
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Re(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(O(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=j(e),n=y();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ne(e,t){let r=J(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,f.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ee.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let c=I(d);c&&t(c)});let a=!1;return()=>{if(!a){a=!0;try{s.close()}catch{}try{o.destroy()}catch{}}}}async function ae(e,t,r){let n=i.openSync(e,f.O_RDWR|f.O_NONBLOCK),o=Buffer.alloc(8192),s="",a=Date.now()+r;try{for(;Date.now()<a;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(c){if(c.code!=="EAGAIN")throw c;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let c;for(;(c=s.indexOf(`
4
4
  `))>=0;){let g=s.slice(0,c);s=s.slice(c+1);let A=I(g);if(A&&t(A))return A}}else await new Promise(c=>setTimeout(c,30))}return null}finally{i.closeSync(n)}}export{I as a,y as b,ge as c,F as d,he as e,ye as f,Se as g,we as h,k as i,C as j,v as k,ve as l,j as m,W as n,J as o,te as p,O as q,re as r,l as s,Te as t,De as u,Re as v,Ne as w};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{C as v,D as f,E as R,G as w,l as p,u as S,x as O}from"./chunk-3SUIAUIY.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as M}from"stream";import{pipeline as k}from"stream/promises";var N="https://sootbean.com",E="SOOTSIM_CDN_ORIGIN",T="SOOTSIM_RUNTIME_CHANNEL",q="https://sootsim.com/changelog";function $(){try{let t=JSON.parse(s.readFileSync(O(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function d(t){let e=$();return(t||process.env[E]||e.cdnOrigin||N).replace(/\/+$/,"")}function x(t){let e=$();return t||process.env[T]||e.runtimeChannel||"stable"}function D(t){let e=new URL(`${d(t)}/runtimes/manifest.json`);return e.searchParams.set("t",String(Date.now())),e.toString()}function U(t,e){return`${d(e)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function y(t){let e=D(t),r=await fetch(e,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${e})`);return await r.json()}function P(t,e={}){let r=x(e.channel),n=e.version||t.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=t.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function _(t={}){v();let e=d(t.cdnOrigin),r=await y(e),{version:n,channel:i,entry:a}=P(r,t),o=p(n),c=t.setActive!==!1;if(!t.force&&s.existsSync(l.join(o,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:e,runtimeDir:o,installed:!1,activated:c,manifest:r};let g=a.tarball||U(n,e),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{C as v,D as f,E as R,G as w,l as p,u as S,x as O}from"./chunk-IBSEFPPL.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as M}from"stream";import{pipeline as k}from"stream/promises";var N="https://sootbean.com",E="SOOTSIM_CDN_ORIGIN",T="SOOTSIM_RUNTIME_CHANNEL",q="https://sootsim.com/changelog";function $(){try{let t=JSON.parse(s.readFileSync(O(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function d(t){let e=$();return(t||process.env[E]||e.cdnOrigin||N).replace(/\/+$/,"")}function x(t){let e=$();return t||process.env[T]||e.runtimeChannel||"stable"}function D(t){let e=new URL(`${d(t)}/runtimes/manifest.json`);return e.searchParams.set("t",String(Date.now())),e.toString()}function U(t,e){return`${d(e)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function y(t){let e=D(t),r=await fetch(e,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${e})`);return await r.json()}function P(t,e={}){let r=x(e.channel),n=e.version||t.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=t.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function _(t={}){v();let e=d(t.cdnOrigin),r=await y(e),{version:n,channel:i,entry:a}=P(r,t),o=p(n),c=t.setActive!==!1;if(!t.force&&s.existsSync(l.join(o,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:e,runtimeDir:o,installed:!1,activated:c,manifest:r};let g=a.tarball||U(n,e),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
3
3
  `),await V(g,m),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
4
4
  `);let h=await A(m);if(h!==a.sha256)throw s.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${a.sha256}, actual ${h}`);let u=l.join(l.dirname(o),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await j(m,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(o,{recursive:!0,force:!0}),s.renameSync(u,o)}catch(b){throw s.rmSync(u,{recursive:!0,force:!0}),b}return c&&R(n),{version:n,channel:i,cdnOrigin:e,runtimeDir:o,installed:!0,activated:c,manifest:r}}async function B(t={}){v();let e=d(t.cdnOrigin),r=x(t.channel),n=await y(e),i=n.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:f()};if(!n.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:f(),latestVersion:i};let o=f(),c=o?p(o):null,g=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!o||!g||w(i,o)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:o,latestVersion:i};let h=await _({version:i,channel:r,cdnOrigin:e,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function K(t={}){let e=f();try{let r=await y(d(t.cdnOrigin)),n=x(t.channel),i=r.channels[n]?.latest??null,a=!!(i&&(!e||w(i,e)>0));return{active:e,latest:i,outdated:a}}catch{return{active:e,latest:null,outdated:!1}}}async function V(t,e){let r=await fetch(t);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${t})`);s.mkdirSync(l.dirname(e),{recursive:!0});let n=`${e}.partial`;try{await k(M.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,e)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function A(t){return new Promise((e,r)=>{let n=C.createHash("sha256"),i=s.createReadStream(t);i.on("data",a=>n.update(a)),i.on("error",r),i.on("end",()=>e(n.digest("hex")))})}function j(t,e){return new Promise((r,n)=>{let i=I("tar",["-xzf",t,"-C",e],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",a=>{a===0?r():n(new Error(`tar exited with code ${a}`))})})}export{N as a,q as b,d as c,x as d,y as e,_ as f,B as g,K as h};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as s}from"./chunk-JCQEG4R6.js";import{A as o}from"./chunk-3SUIAUIY.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as s}from"./chunk-UBJQDMDG.js";import{A as o}from"./chunk-IBSEFPPL.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as C,b as x}from"./chunk-46S56FJJ.js";var k="sootsimConfig";function m(e){return!!e&&Object.keys(e).length>0}function E(e){return e?m(e.modules)||m(e.turboModules)||m(e.nativeModules)||m(e.env)||m(e.network?.remap)||m(e.settings)||m(e.initialState):!1}function M(e,o){let t=new URL(e);return E(o)?t.searchParams.set(k,JSON.stringify(o)):t.searchParams.delete(k),t.toString()}var te="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function _(e){return/^https?:\/\//i.test(e)}function D(e){return e.endsWith(".bundle")}function A(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function U(e){try{let o=_(e),t=new URL(e,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),D(t.pathname)?(t.searchParams.delete("transform.bytecode"),t.searchParams.get("lazy")==="true"&&t.searchParams.set("lazy","false"),A(t),o?t.toString():`${t.pathname}${t.search}${t.hash}`):e}catch{return e}}function re(e,o){try{let t=_(e),r=new URL(e,"http://soot.local");return D(r.pathname)?(r.searchParams.set("hot",o?"true":"false"),t?r.toString():`${r.pathname}${r.search}${r.hash}`):e}catch{return e}}import{exec as N}from"child_process";import $ from"http";import L from"net";import{promisify as O}from"util";var v=O(N);C();var I=250,B=1500,H=120;function F(e,o=H){return new Promise(t=>{let r=new L.Socket,s=!1,i=a=>{s||(s=!0,r.destroy(),t(a))};r.setTimeout(o),r.once("connect",()=>i(!0)),r.once("timeout",()=>i(!1)),r.once("error",()=>i(!1)),r.connect(e,"localhost")})}function h(e,o,t="GET",r=I,s={}){return new Promise(i=>{let a=$.request({hostname:"localhost",port:e,path:o,method:t,timeout:r,headers:s},n=>{let u="";n.on("data",l=>u+=l.toString());let c=(()=>{let l=n.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();n.on("end",()=>i({statusCode:n.statusCode||0,body:u,contentType:c}))});a.on("error",()=>i(null)),a.setTimeout(r,()=>{a.destroy(),i(null)}),a.end()})}var W=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function P(e,o){return!(e<=0||e>=2e4||o.has(e)||e>=5170&&e<=5200)}async function G(e=[]){let o=new Set(e);try{let{stdout:t}=await v("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(t.trim()){let r=new Map;for(let s of t.trim().split(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as C,b as x}from"./chunk-YVDSGGOT.js";var k="sootsimConfig";function m(e){return!!e&&Object.keys(e).length>0}function E(e){return e?m(e.modules)||m(e.turboModules)||m(e.nativeModules)||m(e.env)||m(e.network?.remap)||m(e.settings)||m(e.initialState):!1}function M(e,o){let t=new URL(e);return E(o)?t.searchParams.set(k,JSON.stringify(o)):t.searchParams.delete(k),t.toString()}var te="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function _(e){return/^https?:\/\//i.test(e)}function D(e){return e.endsWith(".bundle")}function A(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function U(e){try{let o=_(e),t=new URL(e,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),D(t.pathname)?(t.searchParams.delete("transform.bytecode"),t.searchParams.get("lazy")==="true"&&t.searchParams.set("lazy","false"),A(t),o?t.toString():`${t.pathname}${t.search}${t.hash}`):e}catch{return e}}function re(e,o){try{let t=_(e),r=new URL(e,"http://soot.local");return D(r.pathname)?(r.searchParams.set("hot",o?"true":"false"),t?r.toString():`${r.pathname}${r.search}${r.hash}`):e}catch{return e}}import{exec as N}from"child_process";import $ from"http";import L from"net";import{promisify as O}from"util";var v=O(N);C();var I=250,B=1500,H=120;function F(e,o=H){return new Promise(t=>{let r=new L.Socket,s=!1,i=a=>{s||(s=!0,r.destroy(),t(a))};r.setTimeout(o),r.once("connect",()=>i(!0)),r.once("timeout",()=>i(!1)),r.once("error",()=>i(!1)),r.connect(e,"localhost")})}function h(e,o,t="GET",r=I,s={}){return new Promise(i=>{let a=$.request({hostname:"localhost",port:e,path:o,method:t,timeout:r,headers:s},n=>{let u="";n.on("data",l=>u+=l.toString());let c=(()=>{let l=n.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();n.on("end",()=>i({statusCode:n.statusCode||0,body:u,contentType:c}))});a.on("error",()=>i(null)),a.setTimeout(r,()=>{a.destroy(),i(null)}),a.end()})}var W=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function P(e,o){return!(e<=0||e>=2e4||o.has(e)||e>=5170&&e<=5200)}async function G(e=[]){let o=new Set(e);try{let{stdout:t}=await v("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(t.trim()){let r=new Map;for(let s of t.trim().split(`
3
3
  `)){let i=s.trim().split(/\s+/);if(i.length<9)continue;let a=Number(i[1]),u=i[8].match(/:(\d+)$/);if(!u)continue;let c=Number(u[1]);P(c,o)&&(r.has(c)||r.set(c,a))}if(r.size>0)return[...r.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}try{let{stdout:t}=await v(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(t.trim()){let r=new Map;for(let s of t.trim().split(`
4
4
  `)){let i=s.match(/:(\d+)\s/),a=s.match(/pid=(\d+)/);if(!i)continue;let n=Number(i[1]),u=a?Number(a[1]):0;P(n,o)&&(r.has(n)||r.set(n,u))}if(r.size>0)return[...r.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}return W.filter(t=>P(t.port,o))}var y=new Map;async function j(e){if(e<=0)return null;let o=y.get(e);if(o)return o;try{let{stdout:t}=await v(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let r of t.split(`
5
5
  `))if(r.startsWith("n")&&r.length>1){let s=r.slice(1).trim();if(s)return y.set(e,s),s}}catch{}return null}function z(e,o){return{port:e,framework:o,bundleUrl:g(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function g(e,o){let t=x().find(s=>s.preferredPort===e),r=t?.runtimeConfig?M(o,t.runtimeConfig):o;return U(r)}function J(e){return e.includes("/node_modules/one/metro-entry.bundle")}function K(e){try{let o=JSON.parse(e);return o&&typeof o=="object"?o:null}catch{return null}}function w(e,o,t){if(!o)return e;try{let r=JSON.parse(o.body),s=r?.extra?.expoClient||r?.extra||{};s.name&&(e.projectName=s.name),s.ios?.bundleIdentifier&&(e.bundleId=s.ios.bundleIdentifier),e.framework==="metro"&&s.sdkVersion&&(e.framework="expo");let i=r?.launchAsset?.url;i&&!e.patched&&!J(e.bundleUrl)&&(e.bundleUrl=g(e.port,i));let a=s.iconUrl||s.ios?.iconUrl||s.icon||s.ios?.icon;if(a)if(e.iconPath=a,t)if(a.startsWith("http"))e.iconUrl=t(a);else{let n=a.replace(/^\.\//,"");e.iconUrl=t(`http://localhost:${e.port}/assets/${n}`)}else e.iconUrl=a.startsWith("http")?a:`http://localhost:${e.port}/assets/${a.replace(/^\.\//,"")}`}catch{}return e}var d=new Set,p=new Set,S=new Set;async function V(e,o){if(!await F(e))return null;let t="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[r,s,i,a]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),S.has(e)?Promise.resolve(null):h(e,"/","GET",B,{"expo-platform":"ios"}),p.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);a&&a.statusCode===200?p.delete(e):p.has(e)||p.add(e);let n=i?K(i.body):null,u=typeof n?.launchAsset?.url=="string"?n.launchAsset.url:null,c=n?.extra?.expoClient||n?.extra||{};if(n&&(u||typeof c.name=="string")){d.add(e);let R=u||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,T=R.includes("/one/metro-entry.bundle")?"one":"expo";return w({port:e,framework:T,bundleUrl:g(e,R),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,o)}if(s&&s.body.includes("packager-status:running"))return d.add(e),w(z(e,a&&a.statusCode===200?"expo":"metro"),i,o);if(r&&r.statusCode===200&&r.body.includes("sootsim-patched"))return d.delete(e),w({port:e,framework:"one",bundleUrl:g(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},i,o);if(s&&s.statusCode===200||a&&a.statusCode===200||i&&i.statusCode===200&&n!=null)return null;let f=await h(e,t,"HEAD");return f&&f.statusCode>0&&f.statusCode<400&&/application\/javascript/i.test(f.contentType||"")?(d.add(e),S.add(e),w({port:e,framework:"one",bundleUrl:g(e,`http://localhost:${e}${t}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,o)):(d.add(e),null)}function q(e){return!!e.bundleId?.trim().toLowerCase()?.startsWith("dev.sootsim.")}var b=new Map,Q=3e4,Y=1500;function X(e){return!e||e.framework==="metro"||e.framework==="unknown"}function Z(e){return e?g(e.port,e.bundleUrl)===e.bundleUrl:!0}function ee(e,o,t=Date.now()){if(o===0||e.pid!==o||!Z(e.result))return!1;let r=t-e.cachedAt;return!(e.result===null&&r>=Q||X(e.result)&&r>=Y)}async function fe(e={}){let o=await G(e.excludePorts),t=new Set(o.map(n=>n.port));for(let n of[...b.keys()])t.has(n)||b.delete(n);for(let n of[...d])t.has(n)||d.delete(n);for(let n of[...p])t.has(n)||p.delete(n);for(let n of[...S])t.has(n)||S.delete(n);let r=[],s=[];for(let{port:n,pid:u}of o){let c=b.get(n);if(c&&ee(c,u)){c.result&&r.push(c.result);continue}c&&c.pid!==u&&(d.delete(n),p.delete(n),S.delete(n)),s.push({port:n,pid:u})}s.length>0&&(await Promise.all(s.map(u=>V(u.port,e.buildIconProxyUrl)))).forEach((u,c)=>{let{port:l,pid:f}=s[c];f!==0&&b.set(l,{pid:f,result:u,cachedAt:Date.now()}),u&&r.push(u)});let i=new Map;for(let{port:n,pid:u}of o)u>0&&i.set(n,u);await Promise.all(r.map(async n=>{let u=i.get(n.port);if(!u)return;n.pid=u;let c=await j(u);c&&(n.cwd=c)}));let a=new Set(i.values());for(let n of[...y.keys()])a.has(n)||y.delete(n);return r.filter(n=>!q(n))}export{M as a,te as b,U as c,re as d,V as e,fe as f};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as C,b as _}from"./chunk-Y3OHYOFS.js";import{c as R}from"./chunk-5QLWXLML.js";import{g as T,j as E,r as N,s as b,t as B}from"./chunk-3SUIAUIY.js";import{a as Y}from"./chunk-ZZWAHZ37.js";import{execFileSync as tt,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as x,readFileSync as et,rmSync as $,writeFileSync as M}from"fs";import{homedir as D}from"os";import{dirname as j,resolve as f}from"path";import{execFileSync as G}from"child_process";import{chmodSync as W,mkdirSync as P,rmSync as K,writeFileSync as L}from"fs";import{dirname as A}from"path";var X="dev.sootsim.daemon",U="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=b(),n=B(),a=A(A(n)),l=A(n),u=`${a}/Resources`;K(o,{recursive:!0,force:!0}),P(N(),{recursive:!0}),P(l,{recursive:!0}),P(u,{recursive:!0}),L(`${a}/Info.plist`,Q()),L(`${a}/PkgInfo`,"APPL????"),L(n,z(t,e,r)),W(n,493);try{G("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${p}
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as C,b as _}from"./chunk-SNLUVL3H.js";import{c as R}from"./chunk-ATVKVVHZ.js";import{g as T,j as E,r as N,s as b,t as B}from"./chunk-IBSEFPPL.js";import{a as Y}from"./chunk-64QAFSY7.js";import{execFileSync as tt,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as x,readFileSync as et,rmSync as $,writeFileSync as M}from"fs";import{homedir as D}from"os";import{dirname as j,resolve as f}from"path";import{execFileSync as G}from"child_process";import{chmodSync as W,mkdirSync as P,rmSync as K,writeFileSync as L}from"fs";import{dirname as A}from"path";var X="dev.sootsim.daemon",U="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=b(),n=B(),a=A(A(n)),l=A(n),u=`${a}/Resources`;K(o,{recursive:!0,force:!0}),P(N(),{recursive:!0}),P(l,{recursive:!0}),P(u,{recursive:!0}),L(`${a}/Info.plist`,Q()),L(`${a}/PkgInfo`,"APPL????"),L(n,z(t,e,r)),W(n,493);try{G("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${p}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{o as d}from"./chunk-3SUIAUIY.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{o as d}from"./chunk-IBSEFPPL.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?O({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{C as m,o as P,q as a}from"./chunk-3SUIAUIY.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{C as m,o as P,q as a}from"./chunk-IBSEFPPL.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
3
3
  `,"utf8"),l.renameSync(t,d()),r}function y(){return g(u()).profiles}function E(e){let r=o(e);return y().find(t=>t.id===r)??null}function _(e=s){let r=o(e),t=E(r);return t||D(r)}function D(e){let r=o(e),t=p(u());if(t.profiles.some(w=>w.id===r))throw new Error(`profile already exists: ${r}`);let f=new Date().toISOString(),n={id:r,createdAt:f,updatedAt:f};return g({version:i,profiles:[...t.profiles,n]}),n}function F(e){let r=o(e);if(r===s)throw new Error("the default profile cannot be deleted; clear it instead");let t=p(u()),f=t.profiles.find(n=>n.id===r);if(!f)throw new Error(`profile not found: ${r}`);return g({version:i,profiles:t.profiles.filter(n=>n.id!==r)}),v(r),f}function v(e){let r=o(e);for(let t of[h(r),A(r)])try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}export{A as a,y as b,_ as c,D as d,F as e,v as f};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t=4001,r="sootsim close";export{t as a,r as b};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as Ns}from"./chunk-ZZWAHZ37.js";function hi(s){return`(async () => {
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as Ns}from"./chunk-64QAFSY7.js";function hi(s){return`(async () => {
3
3
  const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
4
4
  if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
5
5
  await bridge.reloadExternalApp({ resetStorage: ${s?"true":"false"} })
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
3
3
  ${o}
4
4
  `);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t="http://localhost:5173/";export{t as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t="./demo-app-registry.ts",o=null;async function n(){if(o)return o;try{let r=await import(t);o=Array.isArray(r.APPS)?r.APPS:[]}catch{o=[]}return o}function e(){return o??[]}export{n as a,e as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as i,e as d,h as c}from"./chunk-OMJ2DTQJ.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as i,e as d,h as c}from"./chunk-65ZBQDQM.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(t.modeKey)}
4
4
  const target = ${JSON.stringify(o)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Be}from"./chunk-ZPQY5DBY.js";import{a as Le}from"./chunk-UXZRHPX6.js";import{a as ve,b as Ee,c as ne,d as re,e as Ie,f as ie,h as oe,i as Pe,j as Me}from"./chunk-4UGD4KJM.js";import{g as Re,o as Ne,q as Ce,u as De}from"./chunk-EEIUS5AS.js";import{f as Oe}from"./chunk-KSF72FPP.js";import{m as ke}from"./chunk-H2J4Z7LY.js";import{m as Se,n as xe,o as Te,p as $e}from"./chunk-YMBQBKKA.js";import{a as Ae}from"./chunk-46S56FJJ.js";import{a as _e}from"./chunk-NPZPBSZD.js";import{a as je}from"./chunk-LYZXARZO.js";import{c as ee,d as te,e as Fe}from"./chunk-OMJ2DTQJ.js";import{a as ge,b as Z}from"./chunk-Y3OHYOFS.js";import{d as Q,e as be}from"./chunk-RAESCYIA.js";import{g as ye}from"./chunk-QK76RK6J.js";import*as _ from"fs";import{tmpdir as He}from"os";import*as b from"path";import*as v from"fs";import*as g from"path";import{spawnSync as nt}from"child_process";import*as A from"vm";var rt=3e5,it=`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Be}from"./chunk-JFLNZGDS.js";import{a as Le}from"./chunk-JS7SSYDG.js";import{a as ve,b as Ee,c as ne,d as re,e as Ie,f as ie,h as oe,i as Pe,j as Me}from"./chunk-WUEKKZ7Z.js";import{g as Re,o as Ne,q as Ce,u as De}from"./chunk-4JESO36F.js";import{f as Oe}from"./chunk-SU3JJ7ER.js";import{m as ke}from"./chunk-A3VHHWLU.js";import{m as Se,n as xe,o as Te,p as $e}from"./chunk-D2BBJUEY.js";import{a as Ae}from"./chunk-YVDSGGOT.js";import{a as _e}from"./chunk-PAU64XFG.js";import{a as je}from"./chunk-C5QOGCVN.js";import{c as ee,d as te,e as Fe}from"./chunk-65ZBQDQM.js";import{a as ge,b as Z}from"./chunk-SNLUVL3H.js";import{d as Q,e as be}from"./chunk-4INGTBO7.js";import{g as ye}from"./chunk-NZWTC6K6.js";import*as _ from"fs";import{tmpdir as He}from"os";import*as b from"path";import*as v from"fs";import*as g from"path";import{spawnSync as nt}from"child_process";import*as A from"vm";var rt=3e5,it=`
3
3
  let input = '';
4
4
  process.stdin.on('data', (c) => { input += c });
5
5
  process.stdin.on('end', async () => {
@@ -455,7 +455,7 @@ flow extension:
455
455
  + completed (${E.length} steps)`),u>0&&console.log(` screenshots: ${u} \u2192 ${a}`),I&&We(I),T&&console.log(` video: ${T}`),console.log()}catch(m){if(n&&!I)try{I=await d.stopProfile()}catch{}if($&&!T)try{T=await d.stopRecording(),C=d.getLastRecordingDurationMs()}catch(u){console.warn(` recording stop failed: ${u?.message||String(u)}`)}console.error(`
456
456
  x failed: ${m.message}
457
457
  `),I&&(console.log(" partial profile:"),We(I)),T&&console.log(` partial video: ${T}`);try{let u=d.lastFailedStep,y=u?`step-${String(u.index+1).padStart(2,"0")}-${u.kind}`:"unstaged",V=b.join(a,y);await d.captureFailureBundle(V,{error:m,stepIndex:u?.index,stepKind:u?.kind,stepTarget:u?.target}),console.log(` failure bundle: ${V}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(u){try{let y=b.join(a,"error.png");await d.captureFailureScreenshot(y),console.log(` error screenshot: ${y}`)}catch{}console.log(` (failure bundle capture failed: ${u instanceof Error?u.message:String(u)})`)}await ke(k,{errorsCommand:`sootsim get errors 5${d.simId?` --sim ${d.simId}`:""}`,warningsCommand:`sootsim get warnings 5${d.simId?` --sim ${d.simId}`:""}`,requestsCommand:`sootsim get requests 5${d.simId?` --sim ${d.simId}`:""}`}),L=1}finally{k.close()}if(L===0&&w)try{let m=await wt(X??[]),u=["--origin",R,"--events",m];ae&&u.push("--public-origin",ae),T&&u.push("--video",T),T&&C&&Number.isFinite(C)&&u.push("--video-duration-ms",String(Math.round(C))),d.simId&&u.push("--sim",d.simId),qe&&u.push("--open"),le&&u.push("--owner",le),ce&&u.push("--repo",ce),console.log(`
458
- preparing preview upload\u2026`);let{runUpload:y}=await import("./upload-LYANGCPB.js");await y(u,{})}catch(m){console.error(` preview upload failed: ${m?.message||m}`),L=1}return z?(d.simId&&Y.add(d.simId),await ht(S.wsPort,S.commandTimeoutMs,[...Y])):d.simId&&d.simId!==j&&be(d.simId),await Z(),L}async function ht(i,e,t){let n=[...new Set(t.filter(Boolean))];if(n.length===0)return;let r=te(i,{commandTimeoutMs:e});try{let o=await r.listSims(),s=n.filter(l=>o.some(f=>f.id===l&&f.readyState==="open"));if(s.length===0)return;let a=await De(r,i,e,s);await Ne(o,s),a.closed.length>0&&console.log(` closed flow sim(s): ${a.closed.join(", ")}`),a.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${a.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{r.close()}}async function wt(i){let{gzipSync:e}=await import("zlib"),t=i.map(o=>JSON.stringify(o)).join(`
458
+ preparing preview upload\u2026`);let{runUpload:y}=await import("./upload-TIH2LID6.js");await y(u,{})}catch(m){console.error(` preview upload failed: ${m?.message||m}`),L=1}return z?(d.simId&&Y.add(d.simId),await ht(S.wsPort,S.commandTimeoutMs,[...Y])):d.simId&&d.simId!==j&&be(d.simId),await Z(),L}async function ht(i,e,t){let n=[...new Set(t.filter(Boolean))];if(n.length===0)return;let r=te(i,{commandTimeoutMs:e});try{let o=await r.listSims(),s=n.filter(l=>o.some(f=>f.id===l&&f.readyState==="open"));if(s.length===0)return;let a=await De(r,i,e,s);await Ne(o,s),a.closed.length>0&&console.log(` closed flow sim(s): ${a.closed.join(", ")}`),a.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${a.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{r.close()}}async function wt(i){let{gzipSync:e}=await import("zlib"),t=i.map(o=>JSON.stringify(o)).join(`
459
459
  `)+(i.length?`
460
460
  `:""),n=e(Buffer.from(t,"utf8")),r=b.join(He(),`sootsim-events-${Date.now()}.jsonl.gz`);return _.writeFileSync(r,n),console.log(` events: ${i.length} written to ${r} (${n.length} bytes gz)`),r}async function gt(i){let e=i[0],t=n=>i.find((r,o)=>i[o-1]===n);switch(e){case"start":{let{path:n,state:r}=Ie();console.log(" flow draft started"),console.log(` session: ${n}`),console.log(` steps: ${r.steps.length}`);return}case"keep":case"good":{let n=oe();if(n.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!n.kept){console.log(" no pending action to keep");return}console.log(` kept: ${n.candidate.summary}`),console.log(` steps: ${n.stepCount}`);return}case"end":{let n=t("--output")||(i[1]&&!i[1].startsWith("-")?i[1]:void 0),r=i.includes("--validate")||i.includes("--video"),o=i.includes("--video"),s=oe();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let a=Pe(n||(r?bt():void 0));if(a.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!a.valid){console.error(" flow draft is not valid:");for(let l of a.issues)console.error(` - ${l}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(r){let l=vt(i,a.outputPath),f=await Ke(l);if(f!==0){console.error(`
461
461
  validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=f;return}ie(),console.log(` flow draft validated (${a.stepCount} step${a.stepCount===1?"":"s"})`),a.outputPath&&console.log(` saved: ${a.outputPath}`),o&&console.log(" video: recorded during validation run");return}if(ie(),console.log(` flow draft ended (${a.stepCount} step${a.stepCount===1?"":"s"})`),a.outputPath){console.log(` saved: ${a.outputPath}`),console.log(` next: sootsim flow ${a.outputPath} --record`);return}console.log(""),process.stdout.write(a.yaml);return}case"validate":{let n=i[1];(!n||n.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let r=re(n);if(r.length>0){console.error(` x ${n} failed validation:`);for(let o of r)console.error(` - ${o}`);process.exit(1)}console.log(` + ${n} looks valid`);return}}}function yt(i){return i[0]==="--sim"&&i.length>=2?[...i.slice(2),"--sim",i[1]]:i}async function Ht(i){let e=yt(i),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await gt(e),0;let n=await Ke(e);return n!==0&&(process.exitCode=n),n}function We(i){let e=i.avgMs>0?(1e3/i.avgMs).toFixed(1):"?",t=i.sampleCount>0?(i.jankFrames/i.sampleCount*100).toFixed(1):"0";console.log(`
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-CUO7F2JE.js";import"./chunk-64QAFSY7.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-ZZWAHZ37.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-64QAFSY7.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-X2HCJQQE.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-X2HCJQQE.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-LM3JSBQF.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-LM3JSBQF.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t}from"./chunk-EEIUS5AS.js";import"./chunk-KSF72FPP.js";import"./chunk-H2J4Z7LY.js";import"./chunk-YMBQBKKA.js";import"./chunk-46S56FJJ.js";import"./chunk-4UATZVHM.js";import"./chunk-NPZPBSZD.js";import"./chunk-VW643HG5.js";import"./chunk-2J67UJXT.js";import"./chunk-RCPMRHTK.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HWJ52K4J.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{e as buildOpenUrl,d as buildShellUrl,r as closeSimsBulk,s as planBulkCloseTargets,j as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,q as runClaimCommand,t as runCloseCommand,p as runFocusCommand,m as runListCommand,n as runOpenCommand,o as runUseCommand,k as signalDriverLaunchConnected,f as summarizeSimUrl,l as terminatePlaywrightHostsForSims,h as waitForSimMatch,i as waitForSimMatchOrHostExit};
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t}from"./chunk-4JESO36F.js";import"./chunk-SU3JJ7ER.js";import"./chunk-A3VHHWLU.js";import"./chunk-D2BBJUEY.js";import"./chunk-YVDSGGOT.js";import"./chunk-JHYLPDCC.js";import"./chunk-PAU64XFG.js";import"./chunk-UJN3FMEX.js";import"./chunk-NYGESF6F.js";import"./chunk-CH3MWM5W.js";import"./chunk-65ZBQDQM.js";import"./chunk-JXO6UPGI.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";export{e as buildOpenUrl,d as buildShellUrl,r as closeSimsBulk,s as planBulkCloseTargets,j as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,q as runClaimCommand,t as runCloseCommand,p as runFocusCommand,m as runListCommand,n as runOpenCommand,o as runUseCommand,k as signalDriverLaunchConnected,f as summarizeSimUrl,l as terminatePlaywrightHostsForSims,h as waitForSimMatch,i as waitForSimMatchOrHostExit};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-ZZWAHZ37.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-64QAFSY7.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-TVFHGWTW.js";import"./chunk-SNLUVL3H.js";import"./chunk-UBJQDMDG.js";import"./chunk-ATVKVVHZ.js";import"./chunk-4YNKFN2A.js";import"./chunk-A2WASN2L.js";import"./chunk-AN4DM7IB.js";import"./chunk-CHTYIQLE.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-CUO7F2JE.js";import"./chunk-JS3NH2SJ.js";import"./chunk-NZWTC6K6.js";import"./chunk-64QAFSY7.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-H2J4Z7LY.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-YMBQBKKA.js";import{c as D,e as O,g as x}from"./chunk-OMJ2DTQJ.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-A3VHHWLU.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-D2BBJUEY.js";import{c as D,e as O,g as x}from"./chunk-65ZBQDQM.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-LRIJ7MQT.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-ZPHNFMEX.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-4PQ36DTJ.js";import"./chunk-ZPQY5DBY.js";import"./chunk-ODISDSXU.js";import"./chunk-UXZRHPX6.js";import"./chunk-4UGD4KJM.js";import"./chunk-EEIUS5AS.js";import"./chunk-KSF72FPP.js";import"./chunk-H2J4Z7LY.js";import"./chunk-YMBQBKKA.js";import"./chunk-46S56FJJ.js";import"./chunk-4UATZVHM.js";import"./chunk-NPZPBSZD.js";import"./chunk-VW643HG5.js";import"./chunk-LYZXARZO.js";import"./chunk-V7AGBG2P.js";import"./chunk-2J67UJXT.js";import"./chunk-RCPMRHTK.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HWJ52K4J.js";import"./chunk-Y3OHYOFS.js";import"./chunk-JCQEG4R6.js";import"./chunk-7F2LH7U5.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-P2WO5LMI.js";import"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-ZUTVEJVA.js";import"./chunk-JFLNZGDS.js";import"./chunk-B6GISAUX.js";import"./chunk-JS7SSYDG.js";import"./chunk-WUEKKZ7Z.js";import"./chunk-4JESO36F.js";import"./chunk-SU3JJ7ER.js";import"./chunk-A3VHHWLU.js";import"./chunk-D2BBJUEY.js";import"./chunk-YVDSGGOT.js";import"./chunk-JHYLPDCC.js";import"./chunk-PAU64XFG.js";import"./chunk-UJN3FMEX.js";import"./chunk-C5QOGCVN.js";import"./chunk-52O56BTW.js";import"./chunk-NYGESF6F.js";import"./chunk-CH3MWM5W.js";import"./chunk-65ZBQDQM.js";import"./chunk-JXO6UPGI.js";import"./chunk-SNLUVL3H.js";import"./chunk-UBJQDMDG.js";import"./chunk-CHTYIQLE.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-BTTZN2SN.js";import"./chunk-NZWTC6K6.js";import"./chunk-64QAFSY7.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-ODISDSXU.js";import{c as d,e as l,h as a}from"./chunk-OMJ2DTQJ.js";import"./chunk-7F2LH7U5.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-P2WO5LMI.js";import{g as c,h as r,i as g}from"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";function h(){console.log(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-B6GISAUX.js";import{c as d,e as l,h as a}from"./chunk-65ZBQDQM.js";import"./chunk-CHTYIQLE.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-BTTZN2SN.js";import{g as c,h as r,i as g}from"./chunk-NZWTC6K6.js";import"./chunk-64QAFSY7.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-OMJ2DTQJ.js";import"./chunk-HCKTFQLK.js";import{b as v}from"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-65ZBQDQM.js";import"./chunk-WKG5J4RD.js";import{b as v}from"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-DGDBEXXQ.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-JHYLPDCC.js";import"./chunk-PAU64XFG.js";import"./chunk-UJN3FMEX.js";import"./chunk-JXO6UPGI.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-5D4PHINP.js";import"./chunk-URQSBUTU.js";import{a as v,g as h}from"./chunk-EEIUS5AS.js";import"./chunk-KSF72FPP.js";import"./chunk-H2J4Z7LY.js";import"./chunk-YMBQBKKA.js";import"./chunk-46S56FJJ.js";import{b as f,g as u}from"./chunk-4UATZVHM.js";import{a as p}from"./chunk-NPZPBSZD.js";import{c as m}from"./chunk-VW643HG5.js";import"./chunk-2J67UJXT.js";import"./chunk-RCPMRHTK.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HWJ52K4J.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-Y2637KG7.js";import"./chunk-DGDBEXXQ.js";import{a as v,g as h}from"./chunk-4JESO36F.js";import"./chunk-SU3JJ7ER.js";import"./chunk-A3VHHWLU.js";import"./chunk-D2BBJUEY.js";import"./chunk-YVDSGGOT.js";import{b as f,g as u}from"./chunk-JHYLPDCC.js";import{a as p}from"./chunk-PAU64XFG.js";import{c as m}from"./chunk-UJN3FMEX.js";import"./chunk-NYGESF6F.js";import"./chunk-CH3MWM5W.js";import"./chunk-65ZBQDQM.js";import"./chunk-JXO6UPGI.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-ESQL2Q2T.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-ZCCPJMOF.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-ZUTVEJVA.js";import"./chunk-JFLNZGDS.js";import"./chunk-B6GISAUX.js";import"./chunk-JS7SSYDG.js";import{c as a,d as b}from"./chunk-WUEKKZ7Z.js";import"./chunk-4JESO36F.js";import"./chunk-SU3JJ7ER.js";import"./chunk-A3VHHWLU.js";import"./chunk-D2BBJUEY.js";import"./chunk-YVDSGGOT.js";import"./chunk-JHYLPDCC.js";import"./chunk-PAU64XFG.js";import"./chunk-UJN3FMEX.js";import"./chunk-C5QOGCVN.js";import"./chunk-52O56BTW.js";import"./chunk-NYGESF6F.js";import"./chunk-CH3MWM5W.js";import"./chunk-65ZBQDQM.js";import"./chunk-JXO6UPGI.js";import"./chunk-SNLUVL3H.js";import"./chunk-UBJQDMDG.js";import"./chunk-CHTYIQLE.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-BTTZN2SN.js";import"./chunk-NZWTC6K6.js";import"./chunk-64QAFSY7.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-ATVKVVHZ.js";import"./chunk-4YNKFN2A.js";import"./chunk-A2WASN2L.js";import"./chunk-AN4DM7IB.js";import"./chunk-CHTYIQLE.js";import"./chunk-YU6CNUJD.js";import"./chunk-WKG5J4RD.js";import"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-CUO7F2JE.js";import"./chunk-JS3NH2SJ.js";import"./chunk-NZWTC6K6.js";import"./chunk-64QAFSY7.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-UMJDCX2P.js";import"./chunk-RAESCYIA.js";import"./chunk-ZZWAHZ37.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-AN4DM7IB.js";import"./chunk-4INGTBO7.js";import"./chunk-64QAFSY7.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};