sootsim 0.1.52 → 0.1.54

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 (140) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-RUWGJCSS.js → agent-VZPUCYJ5.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-FBCGP5N7.js → agent-wrapper-V7ALP2GU.js} +2 -2
  4. package/dist-cli/chunks/{assert-IOU2NWE2.js → assert-7P4UILIO.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-45LPPN26.js +2 -0
  6. package/dist-cli/chunks/beta-YJTC67JV.js +2 -0
  7. package/dist-cli/chunks/{chunk-EXQJSXDF.js → chunk-3HYJL6GY.js} +1 -1
  8. package/dist-cli/chunks/{chunk-CTEXZ7BE.js → chunk-4PVSZ6GE.js} +1 -1
  9. package/dist-cli/chunks/{chunk-FVBSPGBR.js → chunk-5FQNBWBM.js} +2 -2
  10. package/dist-cli/chunks/{chunk-I5WEW3ES.js → chunk-5SWIBDHV.js} +1 -1
  11. package/dist-cli/chunks/chunk-76WUDRCG.js +2 -0
  12. package/dist-cli/chunks/{chunk-UCCSXQ2P.js → chunk-7FOK7RXF.js} +3 -3
  13. package/dist-cli/chunks/{chunk-MSKCUZ5B.js → chunk-A2BA2KJN.js} +3 -3
  14. package/dist-cli/chunks/{chunk-3DDSYQHM.js → chunk-ACSKJEJV.js} +2 -2
  15. package/dist-cli/chunks/chunk-ARLGT7VR.js +1 -0
  16. package/dist-cli/chunks/{chunk-T6RAXKVI.js → chunk-ATMCM62D.js} +2 -2
  17. package/dist-cli/chunks/chunk-BS3ITOUF.js +1 -0
  18. package/dist-cli/chunks/chunk-CKZ4LXSQ.js +1 -0
  19. package/dist-cli/chunks/{chunk-YDKXZS7D.js → chunk-DLINRAGW.js} +1 -1
  20. package/dist-cli/chunks/{chunk-PZJSYDQ7.js → chunk-DNTCQJWP.js} +3 -3
  21. package/dist-cli/chunks/{chunk-FPIJBBYW.js → chunk-E3P25GBM.js} +2 -2
  22. package/dist-cli/chunks/{chunk-7Y3FYPJH.js → chunk-EDU6E62D.js} +2 -2
  23. package/dist-cli/chunks/chunk-EE54B5YB.js +16 -0
  24. package/dist-cli/chunks/{chunk-DNKB2V2W.js → chunk-G33A5TWY.js} +2 -2
  25. package/dist-cli/chunks/{chunk-IXITVIJV.js → chunk-IGM4OHW6.js} +2 -2
  26. package/dist-cli/chunks/{chunk-EJYVXNQL.js → chunk-ISHA4IUC.js} +2 -2
  27. package/dist-cli/chunks/chunk-ISQUXL6J.js +3 -0
  28. package/dist-cli/chunks/chunk-J6CCM5BR.js +2 -0
  29. package/dist-cli/chunks/{chunk-HRIQRZX3.js → chunk-JBGQ23F4.js} +1 -1
  30. package/dist-cli/chunks/{chunk-MWGIKDXO.js → chunk-KK5EUVGJ.js} +2 -2
  31. package/dist-cli/chunks/chunk-LHDZ4VZV.js +305 -0
  32. package/dist-cli/chunks/{chunk-EQPRFEHH.js → chunk-LZ7CVJAO.js} +2 -2
  33. package/dist-cli/chunks/{chunk-Q2424XB2.js → chunk-M3KFUEUN.js} +1 -1
  34. package/dist-cli/chunks/{chunk-4TSGUAV3.js → chunk-MAKAGEKD.js} +2 -2
  35. package/dist-cli/chunks/{chunk-USGUHWUJ.js → chunk-MNGXYS2K.js} +2 -2
  36. package/dist-cli/chunks/{chunk-UXE5BFPK.js → chunk-NXR73Q5J.js} +2 -2
  37. package/dist-cli/chunks/{chunk-U3UHXJNE.js → chunk-NZNOUWTN.js} +1 -1
  38. package/dist-cli/chunks/{chunk-3MIWVHCX.js → chunk-QVCVU4DC.js} +1 -1
  39. package/dist-cli/chunks/{chunk-6QDFLMJL.js → chunk-TJMYDDAG.js} +1 -1
  40. package/dist-cli/chunks/{chunk-MBH3NFBC.js → chunk-TSXBCV5T.js} +2 -2
  41. package/dist-cli/chunks/{chunk-H4G7IRXG.js → chunk-UYCFIVX6.js} +2 -2
  42. package/dist-cli/chunks/{chunk-EYRQG47K.js → chunk-VHKFU4S2.js} +1 -1
  43. package/dist-cli/chunks/{chunk-IQU56D6C.js → chunk-VWCU546H.js} +1 -1
  44. package/dist-cli/chunks/{chunk-PDZ4JVAW.js → chunk-WYBVFDX7.js} +1 -1
  45. package/dist-cli/chunks/{chunk-BF7F45CZ.js → chunk-XFI4SBWQ.js} +2 -2
  46. package/dist-cli/chunks/chunk-XSZCYAXF.js +11 -0
  47. package/dist-cli/chunks/{chunk-MTE3DEWY.js → chunk-Y7ITI3X2.js} +1 -1
  48. package/dist-cli/chunks/{chunk-GNQSOQXZ.js → chunk-Z5YTYQHU.js} +2 -2
  49. package/dist-cli/chunks/{chunk-JPLTR6JM.js → chunk-ZBR6H6LW.js} +1 -1
  50. package/dist-cli/chunks/{chunk-JPX7OS7B.js → chunk-ZT6JZN2V.js} +2 -2
  51. package/dist-cli/chunks/cli-version-TG76CSHZ.js +2 -0
  52. package/dist-cli/chunks/{compat-ZBLH6EWV.js → compat-XQTJJGFN.js} +3 -3
  53. package/dist-cli/chunks/{config-DH2GG63H.js → config-SREAYZNH.js} +2 -2
  54. package/dist-cli/chunks/control-LZR3EEK6.js +2 -0
  55. package/dist-cli/chunks/{cpu-profile-3PRCXZMV.js → cpu-profile-CUXZKZ4Z.js} +2 -2
  56. package/dist-cli/chunks/{daemon-XSFKUDKZ.js → daemon-MCR7OR22.js} +2 -2
  57. package/dist-cli/chunks/{debug-VAWCOXQ3.js → debug-XZBCUV3A.js} +3 -3
  58. package/dist-cli/chunks/demo-app-registry-TTMQ5X4I.js +2 -0
  59. package/dist-cli/chunks/{detox-UABOFTDQ.js → detox-X3G5ASPP.js} +2 -2
  60. package/dist-cli/chunks/{device-LCB4N66D.js → device-BV3VJE3V.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-MT3WMY4M.js → diagnose-F52LKBS6.js} +2 -2
  62. package/dist-cli/chunks/drivers-A75SQEWU.js +2 -0
  63. package/dist-cli/chunks/{electron-WVNFRA4S.js → electron-VFZMSSGO.js} +3 -3
  64. package/dist-cli/chunks/flow-5LTGWXWP.js +2 -0
  65. package/dist-cli/chunks/{hints-PFAKBGFX.js → hints-VANECRXI.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-X6RB72PF.js → home-paths-J6PSRIMF.js} +2 -2
  67. package/dist-cli/chunks/{inspect-UFYXDO6B.js → inspect-SNFMIN2L.js} +96 -124
  68. package/dist-cli/chunks/install-NEFJEKEX.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-W6QJX52Y.js → install-desktop-X53RE7IV.js} +3 -3
  70. package/dist-cli/chunks/{keys-ORDSAMP7.js → keys-TS7M56JL.js} +2 -2
  71. package/dist-cli/chunks/{launch-NQZTWTPY.js → launch-OW5YEDFK.js} +3 -3
  72. package/dist-cli/chunks/{login-J2NVLHK5.js → login-4TXQM3BF.js} +4 -4
  73. package/dist-cli/chunks/{logout-HI7A6PFH.js → logout-3C3FPCG7.js} +2 -2
  74. package/dist-cli/chunks/{maestro-KIOOFK5M.js → maestro-N74HJGTI.js} +2 -2
  75. package/dist-cli/chunks/{preview-QUJO4B4G.js → preview-FXVS46B5.js} +2 -2
  76. package/dist-cli/chunks/{profile-U6RWYQV2.js → profile-TPFRKRKJ.js} +2 -2
  77. package/dist-cli/chunks/{react-3V65RTQC.js → react-6Q34SQFO.js} +2 -2
  78. package/dist-cli/chunks/{record-476LFCQV.js → record-7F6XI6Z3.js} +2 -2
  79. package/dist-cli/chunks/runtime-UHC43LJI.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-BSRHUXJQ.js → runtime-delivery-7TRQ44Z6.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-2S3BCN35.js → screenshot-M2F3KS6M.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-SZCHOYZV.js → screenshot-mode-HZAPMY7V.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-LGP7LA3M.js → screenshots-PKBYEBBM.js} +2 -2
  84. package/dist-cli/chunks/{server-G4BGS6GE.js → server-OU3NTCYI.js} +2 -2
  85. package/dist-cli/chunks/setup-repo-4WQXPADN.js +2 -0
  86. package/dist-cli/chunks/{skills-2YOLQVV6.js → skills-L5EPL5WL.js} +2 -2
  87. package/dist-cli/chunks/{start-SF3I4SLN.js → start-XLPRV6L7.js} +4 -4
  88. package/dist-cli/chunks/store-TUCLRZNK.js +2 -0
  89. package/dist-cli/chunks/telemetry-PHCMEH7N.js +2 -0
  90. package/dist-cli/chunks/{test-YYHXTVDI.js → test-W5YAIGGY.js} +3 -3
  91. package/dist-cli/chunks/three-mode-NXKHTAYK.js +54 -0
  92. package/dist-cli/chunks/{timeline-IOEIFEH2.js → timeline-5UL2A7L2.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-YF2U5QJY.js → upgrade-K4WXKMQI.js} +2 -2
  94. package/dist-cli/chunks/upload-LVC4KCUG.js +2 -0
  95. package/dist-cli/chunks/{web-GAOXH77P.js → web-SLKO5KZU.js} +2 -2
  96. package/dist-cli/chunks/{what-happened-DBI2RQVE.js → what-happened-NYYYNWGO.js} +2 -2
  97. package/dist-cli/chunks/{whoami-YDAMLYNA.js → whoami-OUJMAWR7.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/index.cjs +1 -1
  112. package/dist-lib/metro.cjs +1 -1
  113. package/dist-lib/profiles.cjs +1 -1
  114. package/dist-lib/render-mode.cjs +1 -1
  115. package/dist-lib/vite-base.cjs +1 -1
  116. package/dist-lib/vite.cjs +1 -1
  117. package/package.json +1 -1
  118. package/dist-cli/chunks/auto-bootstrap-OYBDYAZM.js +0 -2
  119. package/dist-cli/chunks/beta-D4OEPOSE.js +0 -2
  120. package/dist-cli/chunks/chunk-2QNHBNWB.js +0 -16
  121. package/dist-cli/chunks/chunk-A3YSGT76.js +0 -37
  122. package/dist-cli/chunks/chunk-ABEYZDD7.js +0 -11
  123. package/dist-cli/chunks/chunk-DSJ7PGU3.js +0 -2
  124. package/dist-cli/chunks/chunk-DVCE2KQL.js +0 -108
  125. package/dist-cli/chunks/chunk-KVQWMXDV.js +0 -2
  126. package/dist-cli/chunks/chunk-SEETW74F.js +0 -1
  127. package/dist-cli/chunks/chunk-ULHAQFCE.js +0 -1
  128. package/dist-cli/chunks/chunk-YVGHAT6Q.js +0 -1
  129. package/dist-cli/chunks/cli-version-2VO66OZ6.js +0 -2
  130. package/dist-cli/chunks/control-W3BOP6AT.js +0 -2
  131. package/dist-cli/chunks/demo-app-registry-7GNP7WE4.js +0 -2
  132. package/dist-cli/chunks/drivers-YGVUWGMB.js +0 -2
  133. package/dist-cli/chunks/flow-OUOMEOSC.js +0 -2
  134. package/dist-cli/chunks/install-NBUHIXEP.js +0 -2
  135. package/dist-cli/chunks/runtime-4TK5DY5R.js +0 -2
  136. package/dist-cli/chunks/setup-repo-5LUDPPSI.js +0 -2
  137. package/dist-cli/chunks/store-LLUQKQB7.js +0 -2
  138. package/dist-cli/chunks/telemetry-RDTORLS2.js +0 -2
  139. package/dist-cli/chunks/three-mode-5U3H4QDF.js +0 -39
  140. package/dist-cli/chunks/upload-3DFSK4NV.js +0 -2
@@ -0,0 +1,305 @@
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ async function x(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function I(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function v(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function T(e,t){let n=`(async () => {
3
+ const t = window.__sootsimTest
4
+ const mainShell = window.SootSim?.bridges?.mainShell
5
+ const kb = window.__sootsimKeyboard
6
+ if (!t) return { error: 'no test bridge' }
7
+
8
+ let shell = null
9
+ try {
10
+ shell = typeof mainShell?.getState === 'function' ? await mainShell.getState() : null
11
+ } catch {}
12
+
13
+ const tree = await t.dumpTree(12, ${JSON.stringify(t)})
14
+ const nodeCount = (await t.getNodeCount?.()) || 0
15
+ const keyboard = kb && typeof kb.getLayout === 'function' ? kb.getLayout() : null
16
+ return { tree, shell, nodeCount, keyboard }
17
+ })()`;return await e.send({type:"evaluate",code:n})??{}}var y=`(async () => {
18
+ const t = window.__sootsimTest
19
+ if (!t) return []
20
+
21
+ const readLayout = (n) => n?.layout || null
22
+ const readAbs = (n) => n?.absolutePosition || n?.absolute || null
23
+ const readRole = (n) => n?.accessibilityRole || n?.role || null
24
+ const readLabel = (n) => n?.accessibilityLabel || n?.label || n?.text || null
25
+ const readHint = (n) => n?.accessibilityHint || n?.hint || null
26
+ const readState = (n) => n?.accessibilityState || n?.state || null
27
+ const readTestId = (n) => n?.testID || n?.testId || null
28
+ const readType = (n) => typeof n?.type === 'string' ? n.type.toLowerCase() : n?.type
29
+ const readPressable = (n) => {
30
+ if (n?.pressable) return true
31
+ const handlers = Array.isArray(n?.handlers) ? n.handlers : []
32
+ const role = readRole(n)
33
+ return handlers.length > 0 || role === 'button' || role === 'link' || role === 'tab'
34
+ }
35
+ const isTextInput = (n) => n?.isTextInput === true
36
+ const isTextNode = (n) => readType(n) === 'text'
37
+ const isVisibleTarget = (n) => {
38
+ const layout = readLayout(n)
39
+ if (!layout || layout.width <= 0 || layout.height <= 0) return false
40
+ const abs = readAbs(n)
41
+ if (!abs) return true
42
+ const device = n?.device || {}
43
+ const screenW = Number(device.width) || window.innerWidth || 0
44
+ const screenH = Number(device.height) || window.innerHeight || 0
45
+ return (
46
+ abs.x + layout.width > 0 &&
47
+ abs.y + layout.height > 0 &&
48
+ abs.x < screenW &&
49
+ abs.y < screenH
50
+ )
51
+ }
52
+ const hasAccessibleSignal = (n) => {
53
+ const role = readRole(n)
54
+ const label = readLabel(n)
55
+ const hint = readHint(n)
56
+ if (role) return true
57
+ if (hint) return true
58
+ if (isTextInput(n)) return true
59
+ if (readPressable(n)) return true
60
+ if (isTextNode(n) && n?.text) return true
61
+ if (typeof label === 'string' && label.length <= 30 && label !== n?.text) return true
62
+ return false
63
+ }
64
+ const normalize = (n) => {
65
+ const layout = readLayout(n)
66
+ const abs = readAbs(n)
67
+ const role = readRole(n) || (readPressable(n) ? 'button' : isTextInput(n) ? 'textfield' : isTextNode(n) ? 'statictext' : 'none')
68
+ return {
69
+ role,
70
+ label: readLabel(n),
71
+ hint: readHint(n),
72
+ state: readState(n),
73
+ testID: readTestId(n),
74
+ position: abs ? { x: Math.round(abs.x), y: Math.round(abs.y) } : null,
75
+ size: layout ? { w: Math.round(layout.width), h: Math.round(layout.height) } : null,
76
+ }
77
+ }
78
+
79
+ if (typeof t.listInspectable === 'function') {
80
+ const list = await t.listInspectable({})
81
+ if (Array.isArray(list)) {
82
+ return list.filter(n => isVisibleTarget(n) && hasAccessibleSignal(n)).map(normalize)
83
+ }
84
+ }
85
+
86
+ const all = await t.queryAll({ pruneHidden: true })
87
+ return all
88
+ .filter(n => isVisibleTarget(n) && hasAccessibleSignal(n))
89
+ .map(normalize)
90
+ })()`;async function _(e){let t=await e.send({type:"evaluate",code:y});return Array.isArray(t)?t:[]}var l=`
91
+ const fromInspectable = async () => {
92
+ if (typeof t.listInspectable !== 'function') return null
93
+ const list = await t.listInspectable({})
94
+ if (!Array.isArray(list)) return null
95
+ return list.map((n) => {
96
+ const role = n.accessibilityRole ?? n.role
97
+ const label = n.accessibilityLabel ?? n.label
98
+ const layout = n.layout
99
+ const absolutePosition = n.absolutePosition ?? n.absolute
100
+ const screenW = Number(n.device?.width) || window.innerWidth || 0
101
+ const screenH = Number(n.device?.height) || window.innerHeight || 0
102
+ const visibleFrame = layout && absolutePosition
103
+ ? {
104
+ x: Math.max(0, absolutePosition.x),
105
+ y: Math.max(0, absolutePosition.y),
106
+ width: Math.max(
107
+ 0,
108
+ Math.min(screenW, absolutePosition.x + layout.width) -
109
+ Math.max(0, absolutePosition.x),
110
+ ),
111
+ height: Math.max(
112
+ 0,
113
+ Math.min(screenH, absolutePosition.y + layout.height) -
114
+ Math.max(0, absolutePosition.y),
115
+ ),
116
+ }
117
+ : null
118
+ const handlers = Array.isArray(n.handlers) ? n.handlers : []
119
+ const pressable =
120
+ handlers.length > 0 ||
121
+ role === 'button' ||
122
+ role === 'link' ||
123
+ role === 'tab'
124
+ return {
125
+ type: typeof n.type === 'string' ? n.type.toLowerCase() : n.type,
126
+ id: n.id ?? n.nodeId,
127
+ nodeId: n.nodeId,
128
+ testID: n.testID ?? n.testId,
129
+ text: n.text,
130
+ layout,
131
+ absolutePosition,
132
+ visibleFrame,
133
+ style: n.computedStyle ?? n.style ?? {},
134
+ childCount: n.childCount ?? 0,
135
+ pressed: n.pressed ?? false,
136
+ pressable,
137
+ isTextInput: n.isTextInput ?? false,
138
+ accessible: n.accessible ?? true,
139
+ accessibilityLabel: label,
140
+ accessibilityRole: role,
141
+ accessibilityHint: n.accessibilityHint,
142
+ accessibilityState: n.accessibilityState,
143
+ accessibilityValue: n.accessibilityValue,
144
+ }
145
+ })
146
+ }
147
+ const isVisibleTarget = (n) => {
148
+ if (!n?.layout) return false
149
+ const frame = n.visibleFrame
150
+ if (frame) return frame.width > 0 && frame.height > 0
151
+ const abs = n.absolutePosition
152
+ if (!abs) return n.layout.width > 0 && n.layout.height > 0
153
+ const screenW = window.innerWidth || 0
154
+ const screenH = window.innerHeight || 0
155
+ return (
156
+ abs.x + n.layout.width > 0 &&
157
+ abs.y + n.layout.height > 0 &&
158
+ abs.x < screenW &&
159
+ abs.y < screenH
160
+ )
161
+ }
162
+ `;function p(e){return e.testId?{mode:"testid",code:`(async () => {
163
+ const t = window.__sootsimTest
164
+ return (await t.findByTestId(${JSON.stringify(e.testId)})) || (await t.findById(${JSON.stringify(e.testId)}))
165
+ })()`}:e.role?{mode:"role",code:`(async () => await window.__sootsimTest.queryAll({ hasRole: ${JSON.stringify(e.role)}, pruneHidden: true }))()`}:e.type?{mode:"type",code:`(async () => await window.__sootsimTest.queryAll({ type: ${JSON.stringify(e.type)}, pruneHidden: true }))()`}:e.pressable?{mode:"pressable",code:`(async () => {
166
+ const t = window.__sootsimTest
167
+ ${l}
168
+ const inspectable = await fromInspectable()
169
+ if (inspectable) return inspectable.filter(n => n.pressable && isVisibleTarget(n))
170
+ const all = await t.queryAll({ pruneHidden: true })
171
+ return all.filter(n => n.pressable && isVisibleTarget(n))
172
+ })()`}:e.interactive?{mode:"interactive-targets",code:`(async () => {
173
+ const t = window.__sootsimTest
174
+ ${l}
175
+ const inspectable = await fromInspectable()
176
+ if (inspectable) {
177
+ return inspectable.filter(n => n.pressable && isVisibleTarget(n))
178
+ }
179
+ const all = await t.queryAll({ pruneHidden: true })
180
+ return all.filter(n => n.pressable && isVisibleTarget(n))
181
+ })()`}:e.visible?{mode:"visible",code:`(async () => {
182
+ const all = await window.__sootsimTest.queryAll({ pruneHidden: true })
183
+ return all.filter(n => n.layout && n.layout.width > 0 && n.layout.height > 0)
184
+ })()`}:e.text?{mode:"text",code:`(async () => await window.__sootsimTest.findByText(${JSON.stringify(e.text)}))()`}:null}async function k(e,t){let n=p(t);if(!n)return null;let r=await e.send({type:"evaluate",code:n.code});return{mode:n.mode,result:r}}function P(e){return[...e].sort((t,n)=>c(n)-c(t))}function c(e){let t=0;e.testID&&(t+=100),typeof e.text=="string"&&e.text.trim().length>0&&(t+=60),typeof e.accessibilityLabel=="string"&&e.accessibilityLabel.trim().length>0&&(t+=30),e.accessibilityRole&&(t+=15);let n=e.layout?.width??0,r=e.layout?.height??0,s=n*r;return s>=400&&s<=6e4?t+=25:s>6e4&&(t-=20),(e.absolutePosition?.y??0)<0&&(t-=30),t}function L(e){if(e.testID)return`sootsim do tap-id ${u(e.testID)}`;let t=typeof e.text=="string"?e.text.trim():"";if(t.length>0&&t.length<=80)return`sootsim do tap-text ${u(t)}`;let n=Math.round(((e.absolutePosition?.x??0)+(e.layout?.width??0)/2)*10)/10,r=Math.round(((e.absolutePosition?.y??0)+(e.layout?.height??0)/2)*10)/10;return`sootsim do tap ${n} ${r}`}function u(e){return/^[A-Za-z0-9_./@:-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}var b=`(async () => {
185
+ const t = window.__sootsimTest
186
+ let nodes = 0
187
+ try { nodes = (await t?.getNodeCount?.()) || 0 } catch {}
188
+ let targets = 0
189
+ try {
190
+ if (typeof t?.listInspectable === 'function') {
191
+ const list = await t.listInspectable({})
192
+ if (Array.isArray(list)) {
193
+ const screenW = window.innerWidth || 0
194
+ const screenH = window.innerHeight || 0
195
+ const isVisible = (n) => {
196
+ const layout = n?.layout
197
+ if (!layout || layout.width <= 0 || layout.height <= 0) return false
198
+ const abs = n?.absolutePosition || n?.absolute
199
+ if (!abs) return true
200
+ const device = n?.device || {}
201
+ const w = Number(device.width) || screenW
202
+ const h = Number(device.height) || screenH
203
+ return (
204
+ abs.x + layout.width > 0 &&
205
+ abs.y + layout.height > 0 &&
206
+ abs.x < w &&
207
+ abs.y < h
208
+ )
209
+ }
210
+ const hasContentSignal = (n) => {
211
+ const role = n?.accessibilityRole || n?.role
212
+ const label = n?.accessibilityLabel || n?.label
213
+ const handlers = Array.isArray(n?.handlers) ? n.handlers : []
214
+ const text = typeof n?.text === 'string' ? n.text.trim() : ''
215
+ const testID = typeof (n?.testID || n?.testId) === 'string' ? (n.testID || n.testId) : ''
216
+ if (handlers.length > 0) return true
217
+ if (role) return true
218
+ if (n?.isTextInput) return true
219
+ if (text) return true
220
+ if (label) return true
221
+ if (testID && !/^splash|loading/i.test(testID)) return true
222
+ return false
223
+ }
224
+ targets = list.filter(n => isVisible(n) && hasContentSignal(n)).length
225
+ }
226
+ }
227
+ } catch {}
228
+ let errors = 0
229
+ try { errors = window.__sootsimConsole?.count?.()?.errors ?? 0 } catch {}
230
+ return {
231
+ flag: (window).__sootsimExternalAppReady,
232
+ at: (window).__sootsimExternalAppReadyAt || 0,
233
+ nodes,
234
+ targets,
235
+ errors,
236
+ }
237
+ })()`,m=50,g=100,f=750;function w(e){return e.targets>0||e.nodes>=g}async function A(e,t=2e4){let n=Date.now(),r=n+t,s=-1,o=n,i={flag:void 0,at:0,nodes:0,targets:0,errors:0};for(;Date.now()<r;){try{i=await e.send({type:"evaluate",code:b})??i}catch{}let a=Date.now();if(i.nodes!==s&&(s=i.nodes,o=a),i.flag===!0&&i.nodes>=m&&w(i)&&a-o>=f)return{ready:!0,elapsedMs:a-n,nodes:i.nodes};await new Promise(d=>setTimeout(d,150))}return{ready:!1,elapsedMs:Date.now()-n,nodes:i.nodes}}async function D(e,t,n=5e3){return await e.send({type:"evaluate",code:`(async () => {
238
+ const start = Date.now()
239
+ const deadline = start + ${n}
240
+ const t = window.__sootsimTest
241
+ const find = async () => {
242
+ try {
243
+ return (await t?.findByTestId?.(${JSON.stringify(t)})) ||
244
+ (await t?.findById?.(${JSON.stringify(t)})) || null
245
+ } catch {}
246
+ return null
247
+ }
248
+ while (Date.now() < deadline) {
249
+ const node = await find()
250
+ if (node && node.layout && node.layout.width > 0 && node.layout.height > 0) {
251
+ return { found: true, node, elapsed: Date.now() - start }
252
+ }
253
+ await new Promise((r) => setTimeout(r, 80))
254
+ }
255
+ return { found: false, elapsed: Date.now() - start }
256
+ })()`})??{found:!1,elapsed:n}}async function R(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function H(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function N(e){await e.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); "cleared"'})}async function E(e,t={}){let n=t.limit??20,r=t.failed===!1?"getRequests":"getFailedRequests",s=await e.send({type:"call",path:`__sootsimTest.${r}`,args:[n]});return Array.isArray(s)?s:[]}async function B(e){await e.send({type:"call",path:"__sootsimTest.clearRequests",args:[]})}async function C(e){let t=await e.send({type:"evaluate",code:`(() => {
257
+ const obs = window.__sootsimObservability;
258
+ if (!obs) return { ok: false };
259
+ return { ok: true, entries: obs.logs.getSnapshot() };
260
+ })()`});if(!t||!t.ok)throw new Error("observability bridge not installed \u2014 is the engine running?");return t.entries??[]}async function $(e){await e.send({type:"evaluate",code:'window.__sootsimObservability?.logs.clear(); "cleared"'})}function M(e,t={}){let n=new Set,r=e.filter(s=>{let o=`${s.level}\0${s.args.join("")}\0${Math.round(s.ts/1e3)}`;return n.has(o)?!1:(n.add(o),!0)});if(t.showInternal||(r=r.filter(s=>{let o=s.args[0];return!(typeof o=="string"&&o.startsWith("[sootsim]"))})),t.level&&(r=r.filter(s=>t.level.has(s.level))),t.filter){let s=t.filter.toLowerCase();r=r.filter(o=>o.args.join(" ").toLowerCase().includes(s))}return r}async function O(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.summary",args:[t]})}async function F(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.recent",args:[t]})}async function W(e,t,n){await e.send({type:"call",path:"SootSim.bridges.timeline.cursorAdvance",args:[t,n]})}async function z(e){return await e.send({type:"evaluate",code:`(() => {
261
+ const kb = window.__sootsimKeyboard
262
+ if (!kb || typeof kb.getLayout !== 'function') {
263
+ return { error: 'keyboard bridge getLayout() not available' }
264
+ }
265
+ return kb.getLayout()
266
+ })()`})??{error:"keyboard bridge returned no result"}}function h(e){let t=e instanceof Error?e.message:String(e);return t.includes("call target not found: SootSim.bridges.mainShell")||t.includes("test bridge unavailable before app-in-worker boot")}async function S(e,t=0){let n=Date.now()+Math.max(0,t);for(;;)try{return await e.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(r){if(!h(r)||Date.now()>=n)throw r;await new Promise(s=>setTimeout(s,50))}}async function K(e){let t=await e.send({type:"evaluate",code:`(async () => {
267
+ const test = window.__sootsimTest
268
+ const kb = window.__sootsimKeyboard
269
+ const navSnap =
270
+ test && typeof test.getNavigationSnapshot === 'function'
271
+ ? await test.getNavigationSnapshot()
272
+ : null
273
+ const keyboard =
274
+ kb && typeof kb.getLayout === 'function'
275
+ ? (() => {
276
+ const layout = kb.getLayout()
277
+ return layout ? {
278
+ visible: layout.visible,
279
+ mode: layout.mode,
280
+ spec: layout.spec
281
+ ? {
282
+ keyboardType: layout.spec.keyboardType,
283
+ returnKeyType: layout.spec.returnKeyType,
284
+ }
285
+ : null,
286
+ } : null
287
+ })()
288
+ : null
289
+ return { nav: navSnap, keyboard }
290
+ })()`});return{shell:await S(e,500).catch(()=>null),nav:t?.nav??null,keyboard:t?.keyboard??null}}async function J(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function V(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function j(e,t){let n=t==="sheets"?"findSheets":"findPortals";return e.send({type:"evaluate",code:`window.__sootsimDebug.${n}()`})}async function Q(e,t,n=50){let r=t&&t!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(t)}, ${n})`:`window.__sootsimDebug.recent(undefined, ${n})`;return e.send({type:"evaluate",code:r})}async function Y(e,t,n){let r=n.length>0?n.map(s=>JSON.stringify(s)).join(", "):t==="disable"?"'all'":"";return e.send({type:"evaluate",code:`window.__sootsimDebug.${t}(${r})`})}async function q(e){return await e.send({type:"evaluate",code:`(async () => {
291
+ const host = window.__sootsimRenderHost
292
+ const stats = host?.queryStats ? await host.queryStats() : null
293
+ const hostMem = performance.memory
294
+ ? {
295
+ usedJSHeapSize: performance.memory.usedJSHeapSize,
296
+ totalJSHeapSize: performance.memory.totalJSHeapSize,
297
+ jsHeapSizeLimit: performance.memory.jsHeapSizeLimit,
298
+ }
299
+ : null
300
+ return {
301
+ imageLoader: stats?.memory?.imageLoader ?? null,
302
+ workerHeap: stats?.memory?.workerHeap ?? null,
303
+ hostHeap: hostMem,
304
+ }
305
+ })()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function U(e){if(e.total===0)return"nothing recorded";let t=[],n=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],r=new Set;for(let s of n){let o=e.byKind[s];o&&(t.push(`${o} ${s}${o===1?"":"s"}`),r.add(s))}for(let[s,o]of Object.entries(e.byKind))!r.has(s)&&o&&t.push(`${o} ${s}${o===1?"":"s"}`);return t.join(" \xB7 ")}export{x as a,I as b,v as c,T as d,_ as e,k as f,P as g,L as h,b as i,m as j,f as k,w as l,A as m,D as n,R as o,H as p,N as q,E as r,B as s,C as t,$ as u,M as v,O as w,F as x,W as y,z,h as A,S as B,K as C,J as D,V as E,j as F,Q as G,Y as H,q as I,U as J};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{l as P,n as a,y as m}from"./chunk-JPLTR6JM.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.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{l as P,n as a,y as m}from"./chunk-ZBR6H6LW.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};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (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}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},c={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},a=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:m}),"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:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"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:d},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:d},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:c},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:c}},u="iphone-17-pro";function b(e){return h[e]}function g(){return Object.keys(h)}var n={"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"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},S="iphone-17-pro";function v(e){return Object.prototype.hasOwnProperty.call(n,e)?n[e]:null}function f(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(r=>({...r}))}}function B(e){return Object.prototype.hasOwnProperty.call(s,e)?f(s[e]):null}var p={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"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(n),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 y(){if(typeof window>"u")return{};let e={};try{let r=new URLSearchParams(window.location.search),i=r.get("device");i&&p.deviceModel.options?.includes(i)&&(e.deviceModel=i);let l=r.get("colorScheme")??r.get("theme");l&&p.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function H(){let e={};for(let[r,i]of Object.entries(p))e[r]=i.default;return Object.assign(e,y()),e}export{P as a,S as b,v as c,f as d,B as e,h as f,b as g,g as h,p as i,y as j,H as k};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u}from"./chunk-Q2424XB2.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u}from"./chunk-M3KFUEUN.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
3
3
  <div
4
4
  aria-hidden="true"
5
5
  style="
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{i as n}from"./chunk-Q2424XB2.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{i as n}from"./chunk-M3KFUEUN.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
3
  `)}export{g as a};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-JPLTR6JM.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-ZBR6H6LW.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
3
3
  `),await _(g,m),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
4
4
  `);let h=await j(m);if(h!==o.sha256)throw s.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${o.sha256}, actual ${h}`);let u=l.join(l.dirname(a),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await A(m,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(a,{recursive:!0,force:!0}),s.renameSync(u,a)}catch(b){throw s.rmSync(u,{recursive:!0,force:!0}),b}return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!0,activated:c,manifest:r}}async function q(e={}){v();let t=d(e.cdnOrigin),r=x(e.channel),n=await y(t),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 a=f(),c=a?p(a):null,g=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!a||!g||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let h=await V({version:i,channel:r,cdnOrigin:t,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function B(e={}){let t=f();try{let r=await y(d(e.cdnOrigin)),n=x(e.channel),i=r.channels[n]?.latest??null,o=!!(i&&(!t||w(i,t)>0));return{active:t,latest:i,outdated:o}}catch{return{active:t,latest:null,outdated:!1}}}async function _(e,t){let r=await fetch(e);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${e})`);s.mkdirSync(l.dirname(t),{recursive:!0});let n=`${t}.partial`;try{await M(k.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,t)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function j(e){return new Promise((t,r)=>{let n=C.createHash("sha256"),i=s.createReadStream(e);i.on("data",o=>n.update(o)),i.on("error",r),i.on("end",()=>t(n.digest("hex")))})}function A(e,t){return new Promise((r,n)=>{let i=I("tar",["-xzf",e,"-C",t],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",o=>{o===0?r():n(new Error(`tar exited with code ${o}`))})})}export{N as a,D as b,E as c,d,x as e,T as f,P as g,y as h,U as i,V as j,q as k,B as l};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=!0,e="1.0.0",o="public beta",n=`${o} \xB7 free until ${e}`,r="free for everyone until 1.0 \u2014 we send anonymous error and dependency data while you use it";export{t as a,e as b,o as c,n as d,r as e};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o="sootsimConfig";function e(n){return!!n&&Object.keys(n).length>0}function s(n){return n?e(n.modules)||e(n.turboModules)||e(n.nativeModules)||e(n.env)||e(n.settings)||e(n.initialState):!1}function u(n,i){let t=new URL(n);return s(i)?t.searchParams.set(o,JSON.stringify(i)):t.searchParams.delete(o),t.toString()}var g="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function r(n){return/^https?:\/\//i.test(n)}function a(n){return n.endsWith(".bundle")}function l(n){try{let i=r(n),t=new URL(n,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),a(t.pathname)?(t.searchParams.delete("transform.bytecode"),i?t.toString():`${t.pathname}${t.search}${t.hash}`):n}catch{return n}}export{u as a,g as b,l as c};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,c as v,e as A}from"./chunk-CTEXZ7BE.js";import{E as k,F as T}from"./chunk-JPLTR6JM.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,c as v,e as A}from"./chunk-4PVSZ6GE.js";import{E as k,F as T}from"./chunk-ZBR6H6LW.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
3
3
  `)}return o.on("message",n=>{let r;try{r=JSON.parse(n.toString())}catch{return}if(r.id===0)return;let d=c.get(r.id);d&&(c.delete(r.id),r.i>0&&!p&&(p=!0,process.stderr.write(`
4
4
  \u26A0 ${r.i} other CLI identity/identities are driving this sim
5
5
  taps, scrolls, and keyboard input from multiple agents will collide on
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as c,b as p}from"./chunk-I5WEW3ES.js";import{a as m,c as h}from"./chunk-EQPRFEHH.js";import{a as l,b as u,c as d}from"./chunk-MTE3DEWY.js";function L(){let e=l();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=l();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await d(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var f={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:L,launch:O};function x(){let e=c();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function k(e){let r=c();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await p(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:x,launch:k};import{spawn as I}from"child_process";import{closeSync as R,mkdtempSync as _,openSync as $,readFileSync as A}from"fs";import{createRequire as U}from"module";import{tmpdir as g}from"os";import{join as w}from"path";var T=`
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as p}from"./chunk-5SWIBDHV.js";import{a as m,c as h}from"./chunk-LZ7CVJAO.js";import{a as l,b as u,c as d}from"./chunk-Y7ITI3X2.js";function L(){let e=l();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=l();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await d(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var f={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:L,launch:O};function x(){let e=c();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function k(e){let r=c();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await p(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:x,launch:k};import{spawn as I}from"child_process";import{closeSync as R,mkdtempSync as _,openSync as $,readFileSync as A}from"fs";import{createRequire as U}from"module";import{tmpdir as g}from"os";import{join as w}from"path";var T=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (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,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.54 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};