sootsim 0.1.130 → 0.1.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-KNT2MNHS.js → agent-AFUTDI54.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-OQ6MXYSM.js → agent-wrapper-Y3DC2TRR.js} +2 -2
- package/dist-cli/chunks/{app-fonts-5YH5C37X.js → app-fonts-KDB2PRPC.js} +2 -2
- package/dist-cli/chunks/{assert-7GTOVITS.js → assert-2MRMIKZ5.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-C4PEVL4E.js +2 -0
- package/dist-cli/chunks/beta-FO3BNCPQ.js +2 -0
- package/dist-cli/chunks/chunk-24RUJ6PP.js +1 -0
- package/dist-cli/chunks/{chunk-QDMM6U4X.js → chunk-27N7ICZN.js} +2 -2
- package/dist-cli/chunks/{chunk-5QO3N7MG.js → chunk-2IBAWZ7U.js} +1 -1
- package/dist-cli/chunks/{chunk-6YFOOGMX.js → chunk-2RHEFCQU.js} +1 -1
- package/dist-cli/chunks/{chunk-XPYODDHV.js → chunk-3QE2LTSK.js} +1 -1
- package/dist-cli/chunks/{chunk-HCGT7RFQ.js → chunk-4HGQ2PEE.js} +1 -1
- package/dist-cli/chunks/{chunk-DRHDI7V4.js → chunk-7IOM3Q7K.js} +2 -2
- package/dist-cli/chunks/{chunk-H6WPFY4K.js → chunk-ATNPY5MD.js} +2 -2
- package/dist-cli/chunks/{chunk-3QB2RIJ3.js → chunk-DLJATZY5.js} +2 -2
- package/dist-cli/chunks/{chunk-SK4G3KBR.js → chunk-DQ26DUUJ.js} +2 -2
- package/dist-cli/chunks/{chunk-MWZ2K75V.js → chunk-DXEK3GIY.js} +1 -1
- package/dist-cli/chunks/{chunk-NEXDOXJ3.js → chunk-FN7A3SAA.js} +1 -1
- package/dist-cli/chunks/{chunk-YYCJASBO.js → chunk-FXQNZBLR.js} +2 -2
- package/dist-cli/chunks/{chunk-4A5BPDNH.js → chunk-G4E5YPA5.js} +2 -2
- package/dist-cli/chunks/{chunk-PBYFOCRO.js → chunk-GSWF67XQ.js} +3 -3
- package/dist-cli/chunks/{chunk-SPJXGCEP.js → chunk-GYALTZH2.js} +1 -1
- package/dist-cli/chunks/{chunk-OHPV4WP2.js → chunk-HV3JFW4Z.js} +1 -1
- package/dist-cli/chunks/{chunk-IGQ54SMC.js → chunk-IPELBBR7.js} +2 -2
- package/dist-cli/chunks/{chunk-VGCTSDGM.js → chunk-J2ULC5SV.js} +29 -21
- package/dist-cli/chunks/{chunk-4KQKAI4R.js → chunk-JSQZ3L4G.js} +1 -1
- package/dist-cli/chunks/chunk-JUPPJIY7.js +1 -0
- package/dist-cli/chunks/{chunk-7NG5U6NK.js → chunk-KDL7JHIT.js} +3 -3
- package/dist-cli/chunks/{chunk-RSJKAVWL.js → chunk-KKYYY4SU.js} +2 -2
- package/dist-cli/chunks/{chunk-5IYZIY67.js → chunk-M2X6UVSB.js} +1 -1
- package/dist-cli/chunks/{chunk-OOTZNIHU.js → chunk-M55FQGJZ.js} +2 -2
- package/dist-cli/chunks/{chunk-OP5XM4ED.js → chunk-MB7542U3.js} +2 -2
- package/dist-cli/chunks/chunk-MGZLPYES.js +2 -0
- package/dist-cli/chunks/{chunk-6YKC2PAW.js → chunk-O57A7XC3.js} +2 -2
- package/dist-cli/chunks/{chunk-YRRFLKL4.js → chunk-ONEE2ECF.js} +1 -1
- package/dist-cli/chunks/{chunk-MOO23TCK.js → chunk-OPUGOT5W.js} +1 -1
- package/dist-cli/chunks/{chunk-K5N6S6MK.js → chunk-PQ5FPU6A.js} +2 -2
- package/dist-cli/chunks/{chunk-DLYAXBRT.js → chunk-QLX4VBXC.js} +2 -2
- package/dist-cli/chunks/chunk-QR5A7YTU.js +2 -0
- package/dist-cli/chunks/{chunk-T77EKSH4.js → chunk-QZ7HOHPF.js} +1 -1
- package/dist-cli/chunks/chunk-RGNLXPRY.js +1 -0
- package/dist-cli/chunks/{chunk-FGMOSDCQ.js → chunk-RVQVLLEG.js} +1 -1
- package/dist-cli/chunks/{chunk-XRIPNBCE.js → chunk-RXJZIMJJ.js} +2 -2
- package/dist-cli/chunks/{chunk-77BLGF7T.js → chunk-T5U3GOXM.js} +2 -2
- package/dist-cli/chunks/{chunk-R35KFNWH.js → chunk-TU2DICF6.js} +2 -2
- package/dist-cli/chunks/{chunk-7YASUTHS.js → chunk-V3BJFDXP.js} +2 -2
- package/dist-cli/chunks/{chunk-KYJJSQWY.js → chunk-WH53SVIJ.js} +2 -2
- package/dist-cli/chunks/{chunk-BIWTU6Y6.js → chunk-Z65S4SDO.js} +2 -2
- package/dist-cli/chunks/{chunk-JALLIXYA.js → chunk-ZQ4QY2YE.js} +2 -2
- package/dist-cli/chunks/{chunk-TCYVPNQO.js → chunk-ZQM7VKWC.js} +3 -3
- package/dist-cli/chunks/cli-version-XPJ56KAZ.js +2 -0
- package/dist-cli/chunks/{compat-NXBN3X4Z.js → compat-IKHHQX64.js} +3 -3
- package/dist-cli/chunks/{config-TBUMHWAL.js → config-PWBCAAGT.js} +2 -2
- package/dist-cli/chunks/control-2NHYRULE.js +2 -0
- package/dist-cli/chunks/{cpu-profile-UFGS2RPI.js → cpu-profile-ROFNHY3S.js} +2 -2
- package/dist-cli/chunks/{daemon-BUW7GFTP.js → daemon-LBVKOXOS.js} +2 -2
- package/dist-cli/chunks/{debug-7TLF5GM5.js → debug-436NESIA.js} +3 -3
- package/dist-cli/chunks/{detox-MPVMCPWZ.js → detox-SJ362PDO.js} +2 -2
- package/dist-cli/chunks/{device-APKKBXMJ.js → device-E35BFFIK.js} +2 -2
- package/dist-cli/chunks/{diagnose-FVLVFNDW.js → diagnose-X6VQU7JU.js} +2 -2
- package/dist-cli/chunks/drivers-AH7EWZNI.js +2 -0
- package/dist-cli/chunks/{electron-X2DEUVXA.js → electron-DL6UYHMP.js} +3 -3
- package/dist-cli/chunks/flow-XFXAMDYM.js +2 -0
- package/dist-cli/chunks/help-Y3DWIZAN.js +2 -0
- package/dist-cli/chunks/{hints-D47SYWGV.js → hints-CL6GAGYA.js} +2 -2
- package/dist-cli/chunks/{home-paths-23FGUKN4.js → home-paths-UZ7VFTFH.js} +2 -2
- package/dist-cli/chunks/{inspect-HEJB6NB6.js → inspect-ZIAH6YYL.js} +81 -81
- package/dist-cli/chunks/install-QG6EPZBZ.js +2 -0
- package/dist-cli/chunks/{install-desktop-5ZBMF444.js → install-desktop-CUEXCF63.js} +3 -3
- package/dist-cli/chunks/{keys-CI2XOBPT.js → keys-27777IEZ.js} +2 -2
- package/dist-cli/chunks/{launch-6R6RY6R5.js → launch-OSW5K7AB.js} +3 -3
- package/dist-cli/chunks/{login-VLLUNVK7.js → login-7Q7FHH56.js} +4 -4
- package/dist-cli/chunks/{logout-D4YKYIDG.js → logout-GL53I6SM.js} +2 -2
- package/dist-cli/chunks/{maestro-KLROSFMP.js → maestro-QXGWQH5W.js} +2 -2
- package/dist-cli/chunks/{preview-O4365QYC.js → preview-2VJKJQ4L.js} +2 -2
- package/dist-cli/chunks/{profile-VAEKDLEX.js → profile-PAUNDJTM.js} +2 -2
- package/dist-cli/chunks/{react-MMA3LE34.js → react-FH53EVOB.js} +2 -2
- package/dist-cli/chunks/{record-GVWF4BNF.js → record-BK4JRURI.js} +2 -2
- package/dist-cli/chunks/runtime-5T3EBKUX.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-4SSWMW25.js → runtime-delivery-H4BASUBJ.js} +2 -2
- package/dist-cli/chunks/{screenshot-C72QGUMV.js → screenshot-4LZTXRNR.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-OCTJDADF.js → screenshot-mode-NFCQQCUM.js} +2 -2
- package/dist-cli/chunks/{screenshots-AWDE4NDZ.js → screenshots-26ZGYEI4.js} +2 -2
- package/dist-cli/chunks/{server-K6KOFHSQ.js → server-MQKMB65Q.js} +3 -3
- package/dist-cli/chunks/setup-repo-M7OKUYEP.js +2 -0
- package/dist-cli/chunks/{skills-DIETG7L3.js → skills-FTD3ULMY.js} +2 -2
- package/dist-cli/chunks/{start-R54AVUYP.js → start-GYSLGONC.js} +4 -4
- package/dist-cli/chunks/store-AYCRGKD4.js +2 -0
- package/dist-cli/chunks/telemetry-JVR2VHBS.js +2 -0
- package/dist-cli/chunks/{test-6EZ2YHEN.js → test-IM4FIGKF.js} +3 -3
- package/dist-cli/chunks/{three-mode-FWE57WZP.js → three-mode-AY2SXFFZ.js} +2 -2
- package/dist-cli/chunks/{timeline-4FFLAGNO.js → timeline-MUT7OYAS.js} +2 -2
- package/dist-cli/chunks/{upgrade-RI62D65F.js → upgrade-YJLIYQ47.js} +2 -2
- package/dist-cli/chunks/upload-P2ON6DUB.js +2 -0
- package/dist-cli/chunks/{version-RHWBKIPW.js → version-PC3ZKQMT.js} +2 -2
- package/dist-cli/chunks/web-IRQTOA7M.js +2 -0
- package/dist-cli/chunks/{what-happened-QYK3MLTS.js → what-happened-S4BWN4S3.js} +2 -2
- package/dist-cli/chunks/{whoami-XO5L3YTX.js → whoami-BB5DRHYR.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/demo-app-registry.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +26 -9
- package/dist-lib/sdk.mjs +25 -9
- package/dist-lib/skills.cjs +15 -14
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-7QUYTCK3.js +0 -2
- package/dist-cli/chunks/beta-TKYV2VUL.js +0 -2
- package/dist-cli/chunks/chunk-4TWK4GWQ.js +0 -2
- package/dist-cli/chunks/chunk-544KNXXS.js +0 -1
- package/dist-cli/chunks/chunk-HKKCAEKK.js +0 -1
- package/dist-cli/chunks/chunk-LBRLBJAS.js +0 -2
- package/dist-cli/chunks/chunk-TOPGPGVZ.js +0 -1
- package/dist-cli/chunks/cli-version-SHSHHYXU.js +0 -2
- package/dist-cli/chunks/control-CAPNUH2B.js +0 -2
- package/dist-cli/chunks/drivers-QQJOT5IF.js +0 -2
- package/dist-cli/chunks/flow-SOFJ7QI3.js +0 -2
- package/dist-cli/chunks/help-ZFJBFDNU.js +0 -2
- package/dist-cli/chunks/install-5XBIUQGH.js +0 -2
- package/dist-cli/chunks/runtime-ZE6YLTHF.js +0 -2
- package/dist-cli/chunks/setup-repo-KZDLN5I2.js +0 -2
- package/dist-cli/chunks/store-3I5TVDYR.js +0 -2
- package/dist-cli/chunks/telemetry-MZWJNMXL.js +0 -2
- package/dist-cli/chunks/upload-2OQWKQOR.js +0 -2
- package/dist-cli/chunks/web-U4RROYGL.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
function
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
function M(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let s=t.indexOf(n);if(s>=0&&t[s+1]){let o=Number(t[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return e}var w=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function S(t){return typeof t=="string"&&w.has(t)}async function v(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function H(t,e){if(!S(e))return!1;try{return await v(t)}catch{return!1}}async function C(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function B(t,e=5){let r=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}))()`});return{depth:e,tree:r}}async function W(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function F(t,e){let r=`(async () => {
|
|
3
3
|
const t = window.__sootsimTest
|
|
4
4
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
5
5
|
const kb = window.__sootsimKeyboard
|
|
@@ -76,11 +76,12 @@ function O(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
76
76
|
const nodeCount = (await t.getNodeCount?.()) || 0
|
|
77
77
|
const keyboard = kb && typeof kb.getLayout === 'function' ? kb.getLayout() : null
|
|
78
78
|
return { tree, shell, nodeCount, keyboard }
|
|
79
|
-
})()`;return await t.send({type:"evaluate",code:r})??{}}
|
|
79
|
+
})()`;return await t.send({type:"evaluate",code:r})??{}}function b(t={}){let e=t.styling===!0;return`(async () => {
|
|
80
80
|
const t = window.__sootsimTest
|
|
81
81
|
if (!t || typeof t.listInspectable !== 'function') return []
|
|
82
82
|
const list = await t.listInspectable({})
|
|
83
83
|
if (!Array.isArray(list)) return []
|
|
84
|
+
const includeStyle = ${JSON.stringify(e)}
|
|
84
85
|
|
|
85
86
|
const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : 0)
|
|
86
87
|
const round = (v) => Math.round(num(v))
|
|
@@ -153,17 +154,24 @@ function O(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
153
154
|
return list.filter(isVisible).map((n) => {
|
|
154
155
|
const layout = n.layout || { x: 0, y: 0, width: 0, height: 0 }
|
|
155
156
|
const abs = n.absolute || n.absolutePosition || { x: layout.x, y: layout.y }
|
|
156
|
-
// computedStyle has the resolved values; style is the curated subset \u2014
|
|
157
|
-
// fall back across both so radius/fontSize survive either shape.
|
|
158
|
-
const style = Object.assign({}, n.style || {}, n.computedStyle || {})
|
|
159
|
-
const pad = (n.boxModel && n.boxModel.padding) || {}
|
|
160
157
|
const text = typeof n.text === 'string' && n.text.trim() ? n.text.trim() : undefined
|
|
161
|
-
|
|
158
|
+
const base = {
|
|
162
159
|
testID: n.testID || n.testId || undefined,
|
|
163
160
|
role: n.accessibilityRole || n.role || undefined,
|
|
164
161
|
type: typeof n.type === 'string' ? n.type : 'node',
|
|
165
162
|
text,
|
|
166
163
|
box: { x: round(abs.x), y: round(abs.y), w: round(layout.width), h: round(layout.height) },
|
|
164
|
+
borderRadius: 0,
|
|
165
|
+
padding: { t: 0, r: 0, b: 0, l: 0 },
|
|
166
|
+
fontSize: 0,
|
|
167
|
+
}
|
|
168
|
+
if (!includeStyle) return base
|
|
169
|
+
// computedStyle has the resolved values; style is the curated subset \u2014
|
|
170
|
+
// fall back across both so radius/fontSize survive either shape.
|
|
171
|
+
const style = Object.assign({}, n.style || {}, n.computedStyle || {})
|
|
172
|
+
const pad = (n.boxModel && n.boxModel.padding) || {}
|
|
173
|
+
return {
|
|
174
|
+
...base,
|
|
167
175
|
borderRadius: radiusOf(style),
|
|
168
176
|
padding: { t: round(pad.top), r: round(pad.right), b: round(pad.bottom), l: round(pad.left) },
|
|
169
177
|
fontSize: fontSizeOf(style),
|
|
@@ -176,7 +184,7 @@ function O(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
176
184
|
borderWidth: borderWOf(style),
|
|
177
185
|
}
|
|
178
186
|
})
|
|
179
|
-
})()
|
|
187
|
+
})()`}var z=b();async function j(t,e={}){let r=await t.send({type:"evaluate",code:b(e)});return Array.isArray(r)?r:[]}function J(t,e){return t.length===0?" no visible elements found":t.map(n=>{let o=[n.testID?`#${n.testID}`:n.selector?n.selector:n.role?`[${n.role}]`:`<${n.type}>`,`@(${n.box.x},${n.box.y})`,`${n.box.w}x${n.box.h}`];n.borderRadius>0&&o.push(`radius:${n.borderRadius}`);let i=n.padding;if(i.t||i.r||i.b||i.l){let l=i.t===i.r&&i.r===i.b&&i.b===i.l;o.push(l?`pad:${i.t}`:`pad:${i.t},${i.r},${i.b},${i.l}`)}if(n.fontSize>0&&o.push(`font:${n.fontSize}`),e?.styling&&(n.fontWeight&&o.push(`weight:${n.fontWeight}`),n.color&&o.push(`color:${n.color}`),n.bg&&o.push(`bg:${n.bg}`),n.opacity!=null&&o.push(`opacity:${n.opacity}`),n.textDecoration&&o.push(`deco:${n.textDecoration}`),n.overflow&&o.push(`overflow:${n.overflow}`),n.borderWidth&&o.push(`border:${n.borderWidth}`)),n.text){let l=n.text.length>40?`${n.text.slice(0,39)}\u2026`:n.text;o.push(`"${l}"`)}return` ${o.join(" ")}`}).join(`
|
|
180
188
|
`)}var I=`(async () => {
|
|
181
189
|
const t = window.__sootsimTest
|
|
182
190
|
if (!t) return []
|
|
@@ -250,7 +258,7 @@ function O(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
250
258
|
return all
|
|
251
259
|
.filter(n => isVisibleTarget(n) && hasAccessibleSignal(n))
|
|
252
260
|
.map(normalize)
|
|
253
|
-
})()`;async function K(t){let e=await t.send({type:"evaluate",code:I});return Array.isArray(e)?e:[]}var
|
|
261
|
+
})()`;async function K(t){let e=await t.send({type:"evaluate",code:I});return Array.isArray(e)?e:[]}var y=`
|
|
254
262
|
const fromInspectable = async () => {
|
|
255
263
|
if (typeof t.listInspectable !== 'function') return null
|
|
256
264
|
const list = await t.listInspectable({})
|
|
@@ -337,7 +345,7 @@ function O(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
337
345
|
})()`}:t.pressable?{mode:"pressable",code:`(async () => {
|
|
338
346
|
const t = window.__sootsimTest
|
|
339
347
|
if (!t) return []
|
|
340
|
-
${
|
|
348
|
+
${y}
|
|
341
349
|
const inspectable = await fromInspectable()
|
|
342
350
|
if (inspectable) return inspectable.filter(n => n.pressable && isVisibleTarget(n))
|
|
343
351
|
const all = await t.queryAll({ pruneHidden: true })
|
|
@@ -345,7 +353,7 @@ ${p}
|
|
|
345
353
|
})()`}:t.interactive?{mode:"interactive-targets",code:`(async () => {
|
|
346
354
|
const t = window.__sootsimTest
|
|
347
355
|
if (!t) return []
|
|
348
|
-
${
|
|
356
|
+
${y}
|
|
349
357
|
const inspectable = await fromInspectable()
|
|
350
358
|
if (inspectable) {
|
|
351
359
|
return inspectable.filter(n => n.pressable && isVisibleTarget(n))
|
|
@@ -361,7 +369,7 @@ ${p}
|
|
|
361
369
|
const t = window.__sootsimTest
|
|
362
370
|
if (!t) return null
|
|
363
371
|
return await t.findByText(${JSON.stringify(t.text)})
|
|
364
|
-
})()`}:null}async function
|
|
372
|
+
})()`}:null}async function V(t,e){let r=T(e);if(!r)return null;let n=await t.send({type:"evaluate",code:r.code});return{mode:r.mode,result:n}}function G(t){return[...t].sort((e,r)=>p(r)-p(e))}function p(t){let e=0;t.testID&&(e+=100),typeof t.text=="string"&&t.text.trim().length>0&&(e+=60),typeof t.accessibilityLabel=="string"&&t.accessibilityLabel.trim().length>0&&(e+=30),t.accessibilityRole&&(e+=15);let r=t.layout?.width??0,n=t.layout?.height??0,s=r*n;return s>=400&&s<=6e4?e+=25:s>6e4&&(e-=20),(t.absolutePosition?.y??0)<0&&(e-=30),e}function Q(t){if(t.testID)return`sootsim do tap-id ${g(t.testID)}`;let e=typeof t.text=="string"?t.text.trim():"";if(e.length>0&&e.length<=80)return`sootsim do tap-text ${g(e)}`;let r=Math.round(((t.absolutePosition?.x??0)+(t.layout?.width??0)/2)*10)/10,n=Math.round(((t.absolutePosition?.y??0)+(t.layout?.height??0)/2)*10)/10;return`sootsim do tap ${r} ${n}`}function g(t){return/^[A-Za-z0-9_./@:-]+$/.test(t)?t:`'${t.replace(/'/g,"'\\''")}'`}var k=`(async () => {
|
|
365
373
|
const t = window.__sootsimTest
|
|
366
374
|
let nodes = 0
|
|
367
375
|
try { nodes = (await t?.getNodeCount?.()) || 0 } catch {}
|
|
@@ -456,7 +464,7 @@ ${p}
|
|
|
456
464
|
externalStatus,
|
|
457
465
|
externalError,
|
|
458
466
|
}
|
|
459
|
-
})()`,R=100,$=750,_=2e3;function E(t){return t.targets>0||t.nodes>=R}function A(t){return t.targets>0}function
|
|
467
|
+
})()`,R=100,$=750,_=2e3;function E(t){return t.targets>0||t.nodes>=R}function A(t){return t.targets>0}function Y(t){return t.externalError?`guest app errored: ${t.externalError}`:t.loadingText?`still showing "${t.loadingText}"`:t.externalReady===!1?"guest app is still loading":t.flag!==!0&&t.targets>0?"native content is rendered but the ready signal has not settled":t.flag!==!0?"guest app has not emitted sootsim:externalAppReady":t.targets<=0?"ready flag emitted but no visible app content is inspectable yet":"node tree is still changing"}async function U(t,e=2e4,r={}){let n=Date.now(),s=n+e,o=r.progressIntervalMs??_,i=n+o,l=-1,c=n,a={flag:void 0,at:0,nodes:0,targets:0,errors:0,loadingText:"",externalReady:null,externalStatus:"",externalError:""};for(;Date.now()<s;){try{a=await t.send({type:"evaluate",code:k})??a}catch{}let u=Date.now(),d={ready:!1,elapsedMs:u-n,nodes:a.nodes,targets:a.targets,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,errors:a.errors};a.nodes!==l&&(l=a.nodes,c=u);let m=a.flag===!0&&E(a),h=a.flag!==!0&&A(a);if((m||h)&&a.externalReady!==!1&&!a.externalError&&!a.loadingText&&u-c>=$)return{...d,ready:!0};if(r.onProgress&&o>0&&u>=i){r.onProgress(d);do i+=o;while(u>=i)}await new Promise(x=>setTimeout(x,150))}return{ready:!1,elapsedMs:Date.now()-n,nodes:a.nodes,targets:a.targets,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,errors:a.errors}}async function q(t,e,r=5e3,n={}){let s=n.gone===!0;return await t.send({type:"evaluate",code:`(async () => {
|
|
460
468
|
const start = Date.now()
|
|
461
469
|
const deadline = start + ${r}
|
|
462
470
|
const gone = ${s}
|
|
@@ -499,7 +507,7 @@ ${p}
|
|
|
499
507
|
await new Promise((r) => setTimeout(r, 80))
|
|
500
508
|
}
|
|
501
509
|
return { found: false, elapsed: Date.now() - start }
|
|
502
|
-
})()`},{timeoutMs:r+1e3})??{found:!1,elapsed:r}}function
|
|
510
|
+
})()`},{timeoutMs:r+1e3})??{found:!1,elapsed:r}}function f(t,e){return`(() => {
|
|
503
511
|
const out = []
|
|
504
512
|
const seen = new Set()
|
|
505
513
|
const norm = (s) => (typeof s === 'string' ? s : (() => { try { return JSON.stringify(s) } catch { return String(s) } })())
|
|
@@ -521,7 +529,7 @@ ${p}
|
|
|
521
529
|
for (const e of snap) if (e && e.level === ${JSON.stringify(t)}) push(e)
|
|
522
530
|
} catch {}
|
|
523
531
|
return out.sort((a, b) => (a.timestamp || 0) - (b.timestamp || 0)).slice(-${e})
|
|
524
|
-
})()`}async function
|
|
532
|
+
})()`}async function X(t,e=20){let r=await t.send({type:"evaluate",code:f("error",e)});return Array.isArray(r)?r:[]}async function Z(t,e=20){let r=await t.send({type:"evaluate",code:f("warn",e)});return Array.isArray(r)?r:[]}var ee=`(() => {
|
|
525
533
|
const norm = (s) => (typeof s === 'string' ? s : (() => { try { return JSON.stringify(s) } catch { return String(s) } })())
|
|
526
534
|
const key = (lvl, ts, args) => lvl + '|' + Math.round((ts || 0) / 250) + '|' + (Array.isArray(args) ? args.map(norm).join(' ') : norm(args))
|
|
527
535
|
const seen = new Set()
|
|
@@ -546,17 +554,17 @@ ${p}
|
|
|
546
554
|
for (const e of snap) if (e) add(e.level, e.ts, e.args)
|
|
547
555
|
} catch {}
|
|
548
556
|
return { errors, warnings, total: errors + warnings }
|
|
549
|
-
})()`;async function
|
|
557
|
+
})()`;async function te(t){await t.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); window.__sootsimObservability?.logs?.clear?.(); "cleared"'})}async function ne(t,e={}){let r=e.limit??20,n=e.failed===!1?"getRequests":"getFailedRequests",s=await t.send({type:"call",path:`__sootsimTest.${n}`,args:[r]});return Array.isArray(s)?s:[]}async function re(t){await t.send({type:"call",path:"__sootsimTest.clearRequests",args:[]})}async function se(t){let e=await t.send({type:"evaluate",code:`(() => {
|
|
550
558
|
const obs = window.__sootsimObservability;
|
|
551
559
|
if (!obs) return { ok: false };
|
|
552
560
|
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
553
|
-
})()`});return!e||!e.ok?[]:e.entries??[]}async function
|
|
561
|
+
})()`});return!e||!e.ok?[]:e.entries??[]}async function oe(t){await t.send({type:"evaluate",code:'window.__sootsimObservability?.logs.clear(); "cleared"'})}function L(t,e){if(t.source===e.source||t.level!==e.level||Math.abs(t.ts-e.ts)>1e3||t.args.length!==e.args.length)return!1;let r=new Set([t.source,e.source]);return!r.has("sootsim-worker")||!r.has("render-worker")&&!r.has("forwarded-render-worker")?!1:t.args.every((n,s)=>n===e.args[s])}function ae(t,e={}){let r=[];for(let n of t)r.some(s=>L(s,n))||r.push(n);if(e.showInternal||(r=r.filter(n=>{let s=n.args[0];return!(typeof s=="string"&&s.startsWith("[sootsim]"))})),e.level&&(r=r.filter(n=>e.level.has(n.level))),e.filter){let n=e.filter.toLowerCase();r=r.filter(s=>s.args.join(" ").toLowerCase().includes(n))}return r}async function ie(t,e){return await t.send({type:"call",path:"SootSim.bridges.timeline.summary",args:[e]})}async function le(t,e){return await t.send({type:"call",path:"SootSim.bridges.timeline.recent",args:[e]})}async function ue(t,e,r){await t.send({type:"call",path:"SootSim.bridges.timeline.cursorAdvance",args:[e,r]})}async function ce(t){return await t.send({type:"evaluate",code:`(() => {
|
|
554
562
|
const kb = window.__sootsimKeyboard
|
|
555
563
|
if (!kb || typeof kb.getLayout !== 'function') {
|
|
556
564
|
return { error: 'keyboard bridge getLayout() not available' }
|
|
557
565
|
}
|
|
558
566
|
return kb.getLayout()
|
|
559
|
-
})()`})??{error:"keyboard bridge returned no result"}}function N(t){let e=t instanceof Error?t.message:String(t);return e.includes("call target not found: SootSim.bridges.mainShell")||e.includes("test bridge unavailable before app-in-worker boot")}async function P(t,e=0){let r=Date.now()+Math.max(0,e);for(;;)try{return await t.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(n){if(!N(n)||Date.now()>=r)throw n;await new Promise(s=>setTimeout(s,50))}}async function
|
|
567
|
+
})()`})??{error:"keyboard bridge returned no result"}}function N(t){let e=t instanceof Error?t.message:String(t);return e.includes("call target not found: SootSim.bridges.mainShell")||e.includes("test bridge unavailable before app-in-worker boot")}async function P(t,e=0){let r=Date.now()+Math.max(0,e);for(;;)try{return await t.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(n){if(!N(n)||Date.now()>=r)throw n;await new Promise(s=>setTimeout(s,50))}}async function de(t){let e=await t.send({type:"evaluate",code:`(async () => {
|
|
560
568
|
const test = window.__sootsimTest
|
|
561
569
|
const kb = window.__sootsimKeyboard
|
|
562
570
|
const navSnap =
|
|
@@ -580,7 +588,7 @@ ${p}
|
|
|
580
588
|
})()
|
|
581
589
|
: null
|
|
582
590
|
return { nav: navSnap, keyboard }
|
|
583
|
-
})()`});return{shell:await P(t,500).catch(()=>null),nav:e?.nav??null,keyboard:e?.keyboard??null}}async function
|
|
591
|
+
})()`});return{shell:await P(t,500).catch(()=>null),nav:e?.nav??null,keyboard:e?.keyboard??null}}async function ye(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function pe(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function ge(t,e){let r=e==="sheets"?"findSheets":"findPortals";return t.send({type:"evaluate",code:`window.__sootsimDebug.${r}()`})}async function be(t,e,r=50){let n=e&&e!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(e)}, ${r})`:`window.__sootsimDebug.recent(undefined, ${r})`;return t.send({type:"evaluate",code:n})}async function fe(t,e,r){let n=r.length>0?r.map(s=>JSON.stringify(s)).join(", "):e==="disable"?"'all'":"";return t.send({type:"evaluate",code:`window.__sootsimDebug.${e}(${n})`})}async function me(t){return await t.send({type:"evaluate",code:`(async () => {
|
|
584
592
|
const host = window.__sootsimRenderHost
|
|
585
593
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
586
594
|
const hostMem = performance.memory
|
|
@@ -595,4 +603,4 @@ ${p}
|
|
|
595
603
|
workerHeap: stats?.memory?.workerHeap ?? null,
|
|
596
604
|
hostHeap: hostMem,
|
|
597
605
|
}
|
|
598
|
-
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function
|
|
606
|
+
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function he(t){if(t.total===0)return"nothing recorded";let e=[],r=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],n=new Set;for(let s of r){let o=t.byKind[s];o&&(e.push(`${o} ${s}${o===1?"":"s"}`),n.add(s))}for(let[s,o]of Object.entries(t.byKind))!n.has(s)&&o&&e.push(`${o} ${s}${o===1?"":"s"}`);return e.join(" \xB7 ")}var xe=new Set(["react-commit","layout","scroll"]);function D(t,e){if(e===null)return new Date(t).toLocaleTimeString();let r=(t-e)/1e3;return`${r>=0?"+":""}${r.toFixed(2)}s`}function O(t,e){switch(t){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"layout":return`${e.kind??"?"} ${e.testID??e.type??""}${e.skipped?` skipped:${e.reason??"unknown"}`:""}`;case"react-commit":{let r=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${r?.displayName?` \xB7 ${r.displayName} ${r.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}return""}function we(t,e){let r=D(t.t,e).padStart(8),n=t.context.padEnd(6),s=`[${t.kind}]`.padEnd(15),o=t.data,i=o&&typeof o=="object"?O(t.kind,o):"";return` ${r} ${n} ${s} ${i}`}export{M as a,H as b,C as c,B as d,W as e,F as f,j as g,J as h,K as i,V as j,G as k,Q as l,k as m,$ as n,E as o,Y as p,U as q,q as r,X as s,Z as t,ee as u,te as v,ne as w,re as x,se as y,oe as z,ae as A,ie as B,le as C,ue as D,ce as E,N as F,P as G,de as H,ye as I,pe as J,ge as K,be as L,fe as M,me as N,he as O,xe as P,we as Q};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.132 | (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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as Ae}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as Ae}from"./chunk-RXJZIMJJ.js";import{a as _e}from"./chunk-DQ26DUUJ.js";import{a as Ee}from"./chunk-Z65S4SDO.js";import{a as V,b as ye,c as be,d as Z,e as ee,f as ve,g as te,i as re,j as Se,k as xe}from"./chunk-V3BJFDXP.js";import{g as ke,n as Me,p as Ie,t as Pe}from"./chunk-ZQ4QY2YE.js";import{d as Te,f as Fe}from"./chunk-QLX4VBXC.js";import{m as ge}from"./chunk-FXQNZBLR.js";import{c as X,d as Q,e as he}from"./chunk-TU2DICF6.js";import{a as $e}from"./chunk-FN7A3SAA.js";import{d as Y}from"./chunk-HV3JFW4Z.js";import{a as pe,b as G}from"./chunk-IPELBBR7.js";import{f as we}from"./chunk-2RHEFCQU.js";import*as A from"fs";import{tmpdir as Re}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ce="__sootsimCliPerf",He="maestroCopiedText",De=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function qe(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function ze(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():qe(t.flowDir);return w.resolve(i,r)}return w.join(o,r)}function Ge(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function ie(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function Ye(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=be(ye.parse(t),De);return Array.isArray(r)?r:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,r=Date.now(),i=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
|
|
3
3
|
const test = window.__sootsimTest
|
|
4
4
|
if (!test) return { count: 0, loading: true }
|
|
5
5
|
const count = (await test.getNodeCount?.()) || 0
|
|
@@ -372,7 +372,7 @@ flow extension:
|
|
|
372
372
|
+ completed (${M.length} steps)`),c>0&&console.log(` screenshots: ${c} \u2192 ${s}`),I&&Oe(I),S&&console.log(` video: ${S}`),console.log()}catch(u){if(r&&!I)try{I=await d.stopProfile()}catch{}if(T&&!S)try{S=await d.stopRecording(),_=d.getLastRecordingDurationMs()}catch(c){console.warn(` recording stop failed: ${c?.message||String(c)}`)}console.error(`
|
|
373
373
|
x failed: ${u.message}
|
|
374
374
|
`),I&&(console.log(" partial profile:"),Oe(I)),S&&console.log(` partial video: ${S}`);try{let c=d.lastFailedStep,h=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",R=y.join(s,h);await d.captureFailureBundle(R,{error:u,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),console.log(` failure bundle: ${R}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let h=y.join(s,"error.png");await d.captureFailureScreenshot(h),console.log(` error screenshot: ${h}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await ge($,{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}`:""}`}),O=1}finally{$.close()}if(O===0&&v)try{let u=await et(z??[]),c=["--origin",U,"--events",u];oe&&c.push("--public-origin",oe),S&&c.push("--video",S),S&&_&&Number.isFinite(_)&&c.push("--video-duration-ms",String(Math.round(_))),d.simId&&c.push("--sim",d.simId),Ve&&c.push("--open"),se&&c.push("--owner",se),ne&&c.push("--repo",ne),console.log(`
|
|
375
|
-
preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-
|
|
375
|
+
preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-P2ON6DUB.js");await h(c,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(d.simId&&H.add(d.simId),await Ze(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Ze(o,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let i=Q(o,{commandTimeoutMs:e});try{let n=await i.listSims(),s=r.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await Pe(i,o,e,s);await Me(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{i.close()}}async function et(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
|
|
376
376
|
`)+(o.length?`
|
|
377
377
|
`:""),r=e(Buffer.from(t,"utf8")),i=y.join(Re(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(i,r),console.log(` events: ${o.length} written to ${i} (${r.length} bytes gz)`),i}async function tt(o){let e=o[0],t=r=>o.find((i,n)=>o[n-1]===r);switch(e){case"start":{let{path:r,state:i}=ve();console.log(" flow draft started"),console.log(` session: ${r}`),console.log(` steps: ${i.steps.length}`);return}case"keep":case"good":{let r=re();if(r.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!r.kept){console.log(" no pending action to keep");return}console.log(` kept: ${r.candidate.summary}`),console.log(` steps: ${r.stepCount}`);return}case"end":{let r=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),i=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=re();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let l=Se(r||(i?it():void 0));if(l.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!l.valid){console.error(" flow draft is not valid:");for(let a of l.issues)console.error(` - ${a}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(i){let a=ot(o,l.outputPath),m=await Ne(a);if(m!==0){console.error(`
|
|
378
378
|
validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=m;return}te(),console.log(` flow draft validated (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath&&console.log(` saved: ${l.outputPath}`),n&&console.log(" video: recorded during validation run");return}if(te(),console.log(` flow draft ended (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath){console.log(` saved: ${l.outputPath}`),console.log(` next: sootsim flow ${l.outputPath} --record`);return}console.log(""),process.stdout.write(l.yaml);return}case"validate":{let r=o[1];(!r||r.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let i=ee(r);if(i.length>0){console.error(` x ${r} failed validation:`);for(let n of i)console.error(` - ${n}`);process.exit(1)}console.log(` + ${r} looks valid`);return}}}function rt(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function kt(o){let e=rt(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await tt(e),0;let r=await Ne(e);return r!==0&&(process.exitCode=r),r}function Oe(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as d,b as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as d,b as v}from"./chunk-FN7A3SAA.js";import{a as f,c as w}from"./chunk-PQ5FPU6A.js";import{a as u,b as h,c as m}from"./chunk-QZ7HOHPF.js";import{c as p}from"./chunk-HV3JFW4Z.js";function _(){let e=u();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function M(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=u();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 m(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 g={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:_,launch:M};function I(){let e=d();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 x(e){let r=d();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await v(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 y={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:x};import{spawn as C}from"child_process";import{closeSync as E,mkdtempSync as A,openSync as L,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as b}from"os";import{join as P}from"path";var N=`
|
|
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.
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t=4001,n="sootsim close";export{t as a,n as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-MB7542U3.js";import{n as o}from"./chunk-2IBAWZ7U.js";import{chmodSync as p,existsSync as d,mkdirSync as g,readFileSync as I,rmSync as f,writeFileSync as _}from"node:fs";import{dirname as y,join as h,resolve as k}from"node:path";function i(){return h(o(),"credentials.json")}function S(){let n=i();if(!d(n))return null;try{let t=JSON.parse(I(n,"utf8"));return t.version!==1||typeof t.apiKey!="string"||!t.apiKey.startsWith("sk_sootsim_")?null:t.apiKey}catch{return null}}function w(n){if(!n.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let t=i();g(y(k(t)),{recursive:!0}),_(t,JSON.stringify({version:1,apiKey:n,savedAt:new Date().toISOString()},null,2)+`
|
|
3
3
|
`);try{p(t,384)}catch{}}function E(){f(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function O(n){return!!(n&&n.length>=20&&m.some(t=>n.startsWith(t)))}function A(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),r=n||t;if(!O(r))return null;let e=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!e)return null;let[l,u]=e.includes("/")?e.split("/",2):[null,null],c=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),a=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:e,repositoryId:c||null,owner:l||null,repo:u||null,installationId:a||null,source:n?"soot-runner":"github-actions"}}function x(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=A();if(t)return t;let r=S();if(r)return{kind:"api-key",secret:r,source:"file"};let e=s();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function H(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function N(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{S as a,w as b,E as c,x as d,H as e,N as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{n as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{n as d}from"./chunk-2IBAWZ7U.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,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as i,e as d,h as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.132 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as i,e as d,h as c}from"./chunk-TU2DICF6.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,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.132 | (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};
|