sootsim 0.1.234 → 0.1.236
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 +4 -4
- package/dist-cli/chunks/{agent-RKA6QTYE.js → agent-CU7Q5K22.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-OB6OUCSF.js → agent-wrapper-FCUDUV52.js} +2 -2
- package/dist-cli/chunks/{app-fonts-6PFARL6B.js → app-fonts-SPA6U6OA.js} +2 -2
- package/dist-cli/chunks/{assert-Q6BV2NEM.js → assert-MZVVW7DV.js} +2 -2
- package/dist-cli/chunks/{auth-HJ3NXFJP.js → auth-FV3CIFG6.js} +2 -2
- package/dist-cli/chunks/beta-7X7N2CB2.js +2 -0
- package/dist-cli/chunks/{camera-LWGYRGBB.js → camera-ALWQVYHU.js} +2 -2
- package/dist-cli/chunks/{chunk-VWAOND2T.js → chunk-3PLNSSEF.js} +1 -1
- package/dist-cli/chunks/{chunk-WPS3EFNK.js → chunk-4Z3JQFES.js} +1 -1
- package/dist-cli/chunks/{chunk-TGPXK5U2.js → chunk-54UQB2TW.js} +2 -2
- package/dist-cli/chunks/{chunk-36HLSYS2.js → chunk-5E24H5Z5.js} +2 -2
- package/dist-cli/chunks/{chunk-IHRBDBGS.js → chunk-6ALJUG36.js} +2 -2
- package/dist-cli/chunks/chunk-6NWVRY7I.js +1 -0
- package/dist-cli/chunks/{chunk-HTTSF6YF.js → chunk-7KGIZCO3.js} +2 -2
- package/dist-cli/chunks/{chunk-KIYCMEMO.js → chunk-7NCUVJSZ.js} +3 -3
- package/dist-cli/chunks/{chunk-4YPQAOC6.js → chunk-APQFVJDK.js} +1 -1
- package/dist-cli/chunks/{chunk-AASXS3LK.js → chunk-BA4Q3KRH.js} +2 -2
- package/dist-cli/chunks/{chunk-DAWIWEWR.js → chunk-BDL6UO36.js} +1 -1
- package/dist-cli/chunks/{chunk-JXPGKN3F.js → chunk-BGW73A3C.js} +6 -6
- package/dist-cli/chunks/{chunk-5FDIH76R.js → chunk-DKGKL6KP.js} +2 -2
- package/dist-cli/chunks/{chunk-PSDDQWFO.js → chunk-DUCTVOTV.js} +1 -1
- package/dist-cli/chunks/{chunk-DFAMEHIJ.js → chunk-EURBYQXU.js} +2 -2
- package/dist-cli/chunks/{chunk-2QOLVYFF.js → chunk-FK57ISRW.js} +1 -1
- package/dist-cli/chunks/chunk-G3EZ5KVE.js +2 -0
- package/dist-cli/chunks/{chunk-XK5YL6SF.js → chunk-G3MVPZBK.js} +2 -2
- package/dist-cli/chunks/{chunk-MS33P5CV.js → chunk-GB3IT6AN.js} +1 -1
- package/dist-cli/chunks/{chunk-5AVOWKYR.js → chunk-HBQ7CCHG.js} +1 -1
- package/dist-cli/chunks/{chunk-KIALD4JX.js → chunk-I664RIMB.js} +2 -2
- package/dist-cli/chunks/{chunk-YV35LVCO.js → chunk-IQ2IFKZ4.js} +2 -2
- package/dist-cli/chunks/{chunk-5JX4BCGL.js → chunk-KWNVZ2LX.js} +1 -1
- package/dist-cli/chunks/chunk-LBXFCH5I.js +118 -0
- package/dist-cli/chunks/{chunk-B77AQNOH.js → chunk-NX4NOT7Z.js} +1 -1
- package/dist-cli/chunks/{chunk-54U7A36G.js → chunk-ORSIJ76W.js} +1 -1
- package/dist-cli/chunks/{chunk-DVPVSP7S.js → chunk-PEFAS7Q4.js} +2 -2
- package/dist-cli/chunks/{chunk-6NUCPZGB.js → chunk-PGLRJ4GA.js} +1 -1
- package/dist-cli/chunks/{chunk-KIYNMK6P.js → chunk-PUH4S4CC.js} +2 -2
- package/dist-cli/chunks/{chunk-KQCFBS3K.js → chunk-Q2X3WO5X.js} +2 -2
- package/dist-cli/chunks/{chunk-2YOWFGX3.js → chunk-QPZYFSTW.js} +1 -1
- package/dist-cli/chunks/{chunk-A3R3A55R.js → chunk-RBDWTH6O.js} +2 -2
- package/dist-cli/chunks/{chunk-6KZBSG52.js → chunk-RGDT3EBF.js} +11 -3
- package/dist-cli/chunks/{chunk-LJLYNHJF.js → chunk-SACUEZZP.js} +1 -1
- package/dist-cli/chunks/{chunk-37CANPD2.js → chunk-SXENH4HF.js} +3 -3
- package/dist-cli/chunks/{chunk-4NTBHQZU.js → chunk-T7KUJUST.js} +3 -3
- package/dist-cli/chunks/{chunk-IB6NUH34.js → chunk-TB7CIKZ3.js} +2 -2
- package/dist-cli/chunks/{chunk-VVVCJPSQ.js → chunk-UGRYC3HL.js} +1 -1
- package/dist-cli/chunks/{chunk-57FLKZOS.js → chunk-V5LQP2JL.js} +35 -33
- package/dist-cli/chunks/{chunk-UQEDU53Q.js → chunk-VKJ4BFFU.js} +2 -2
- package/dist-cli/chunks/{chunk-7G4VSJQ4.js → chunk-VQKTMX3M.js} +1 -1
- package/dist-cli/chunks/{chunk-FSSTNYFL.js → chunk-VRXFBWBW.js} +2 -2
- package/dist-cli/chunks/{chunk-LW25UTSS.js → chunk-W7H4OAY4.js} +2 -2
- package/dist-cli/chunks/chunk-ZYEIV7ZN.js +1 -0
- package/dist-cli/chunks/cli-version-457KT7IL.js +2 -0
- package/dist-cli/chunks/{compat-NN643MYB.js → compat-JCUMIY6N.js} +3 -3
- package/dist-cli/chunks/{config-GVVXK4LX.js → config-3RHULBQA.js} +2 -2
- package/dist-cli/chunks/{control-TL666XUK.js → control-NZJHUGDA.js} +2 -2
- package/dist-cli/chunks/daemon-4WYYSXCN.js +2 -0
- package/dist-cli/chunks/{debug-4D7UPKL6.js → debug-FXTGTIA4.js} +3 -3
- package/dist-cli/chunks/{desktop-UK3TXNWM.js → desktop-4Z3DFJZ3.js} +3 -3
- package/dist-cli/chunks/{detox-GGCJIYAO.js → detox-ZHVRCYVV.js} +2 -2
- package/dist-cli/chunks/{device-27GVWZRM.js → device-B7RJOTO2.js} +2 -2
- package/dist-cli/chunks/{diagnose-MRGZ2QTM.js → diagnose-TWMUMITQ.js} +2 -2
- package/dist-cli/chunks/drivers-AK6KP6X4.js +2 -0
- package/dist-cli/chunks/{film-SFZGOMH5.js → film-DGR6ALQ2.js} +3 -3
- package/dist-cli/chunks/flow-RYMDNC4V.js +2 -0
- package/dist-cli/chunks/help-JVO6L7HS.js +2 -0
- package/dist-cli/chunks/{hidden-runtime-alias-EJ5NRH2V.js → hidden-runtime-alias-XM5Z6GME.js} +2 -2
- package/dist-cli/chunks/{home-paths-ICQCVYFE.js → home-paths-BVXLMDUT.js} +2 -2
- package/dist-cli/chunks/inspect-TBOCLFLQ.js +2 -0
- package/dist-cli/chunks/install-desktop-N6IVQZBG.js +2 -0
- package/dist-cli/chunks/{login-YJFCUM4C.js → login-CTAICT4D.js} +4 -4
- package/dist-cli/chunks/{logout-T4MKUGMT.js → logout-X4T57OXG.js} +2 -2
- package/dist-cli/chunks/{maestro-MJH5BSJG.js → maestro-ZQYSFWKY.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-5ORUBHVA.js → maestro-generate-Y25ETFOO.js} +3 -3
- package/dist-cli/chunks/{mode-D7MC6TTG.js → mode-KBQ2HTV2.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-G6FLEREA.js +2 -0
- package/dist-cli/chunks/{perf-IRUFRNO5.js → perf-MRGDCXKC.js} +2 -2
- package/dist-cli/chunks/{record-GTZOEPUV.js → record-6JMMR3DI.js} +8 -8
- package/dist-cli/chunks/runtime-3EJHJAAM.js +2 -0
- package/dist-cli/chunks/{screenshot-command-72DH5GXF.js → screenshot-command-SEHNB5PW.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-6QQ4NPZ6.js → screenshots-capture-GAZMPQ2T.js} +2 -2
- package/dist-cli/chunks/{serve-C2GAQBTN.js → serve-HQAJCUJP.js} +6 -6
- package/dist-cli/chunks/{setup-TOAATCCA.js → setup-A3PIKOJA.js} +3 -3
- package/dist-cli/chunks/{skills-PPGCRJYB.js → skills-4522XNAV.js} +2 -2
- package/dist-cli/chunks/{storage-LI55AAJB.js → storage-VC4FO3X4.js} +2 -2
- package/dist-cli/chunks/store-Y6DYP7EA.js +2 -0
- package/dist-cli/chunks/telemetry-3M5Y7GDR.js +2 -0
- package/dist-cli/chunks/{timeline-VTU7U2F7.js → timeline-AU6ZXEJY.js} +2 -2
- package/dist-cli/chunks/{upgrade-VQSDSFTG.js → upgrade-M5V7P7HI.js} +2 -2
- package/dist-cli/chunks/upload-F47SYC4Y.js +2 -0
- package/dist-cli/chunks/{version-V37CLU3B.js → version-BIWUB3OU.js} +2 -2
- package/dist-cli/chunks/{web-PPVH2K63.js → web-Y2HUWQL6.js} +2 -2
- package/dist-cli/chunks/{what-happened-3ZN3FV34.js → what-happened-TTM4T2XG.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.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 +15 -3
- 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 +12 -5
- 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 +12 -5
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +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/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +30 -10
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/bridge-constants.ts +14 -0
- package/src/host/websocket-proxy.ts +11 -2
- package/dist-cli/chunks/beta-7LVCC4DC.js +0 -2
- package/dist-cli/chunks/chunk-2RP6TUZ3.js +0 -1
- package/dist-cli/chunks/chunk-7ST3HVVO.js +0 -2
- package/dist-cli/chunks/chunk-TAPKEEG2.js +0 -1
- package/dist-cli/chunks/chunk-TD3PSMQU.js +0 -118
- package/dist-cli/chunks/cli-version-7DTLL57G.js +0 -2
- package/dist-cli/chunks/daemon-MTBKLQAM.js +0 -2
- package/dist-cli/chunks/drivers-BHAS62HS.js +0 -2
- package/dist-cli/chunks/flow-X3NSSQNP.js +0 -2
- package/dist-cli/chunks/help-7WJO45XU.js +0 -2
- package/dist-cli/chunks/inspect-FRSSCWP2.js +0 -2
- package/dist-cli/chunks/install-desktop-67O3RXXA.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-KV3FG6HR.js +0 -2
- package/dist-cli/chunks/runtime-RXHJI4Y4.js +0 -2
- package/dist-cli/chunks/store-L4ASCJJM.js +0 -2
- package/dist-cli/chunks/telemetry-BVONU4AY.js +0 -2
- package/dist-cli/chunks/upload-REVW5JI2.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as ce}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as ce}from"./chunk-EURBYQXU.js";import{b as Et,c as Rt,k as Pt}from"./chunk-TB7CIKZ3.js";import{a as oe,b as A,c as D,d as Ie,e as ie,f as X,g as de,h as ye,i as Mt,j as Ft,k as Te,l as Ot}from"./chunk-IQ2IFKZ4.js";import{A as wt,B as xt,E as $t,G as St,I as ue,J as vt,P as We,a as ke,b as nt,c as rt,d as it,e as at,f as lt,g as ct,h as ut,i as dt,j as pt,k as Be,l as Ce,q as je,r as mt,s as ft,t as fe,u as gt,v as _e,w as Le,x as yt,y as ht,z as bt}from"./chunk-PGLRJ4GA.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as ge}from"./chunk-BGW73A3C.js";import{a as tt}from"./chunk-SACUEZZP.js";import{a as Q}from"./chunk-W7H4OAY4.js";import{c as ot}from"./chunk-G3EZ5KVE.js";import{c as st}from"./chunk-ORSIJ76W.js";import{c as Ae,e as De}from"./chunk-LBXFCH5I.js";function qe(e){return`(async () => {
|
|
3
3
|
const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
|
|
4
4
|
if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
|
|
5
5
|
await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
|
|
@@ -73,7 +73,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
73
73
|
}
|
|
74
74
|
})()`}import{existsSync as Ro,mkdirSync as Ct,readFileSync as Po,rmSync as He,writeFileSync as jt}from"fs";import{tmpdir as Ao}from"os";import{dirname as Lt,join as Do,resolve as Wt}from"path";import*as Ne from"fs";function Eo(e){let o={},s=e,a=p=>Array.isArray(p)?p:[],c=e.match(/^---\n([\s\S]*?)\n---\n?/);if(c){try{o=ce.parse(c[1])??{}}catch(y){console.warn(` warn: could not parse frontmatter: ${y.message}`)}s=e.slice(c[0].length);let p=ce.parse(s);return{frontmatter:o,steps:a(p)}}if(/\n---\s*\n/.test(e))try{let p=ce.parseAllDocuments(e);if(p.length>=2){let y=p[0].toJS(),b=p[p.length-1].toJS();return{frontmatter:y&&typeof y=="object"?y:{},steps:a(b)}}}catch(p){console.warn(` warn: could not parse multi-doc flow: ${p.message}`)}let l=ce.parse(s);return{frontmatter:o,steps:a(l)}}var Bt=new Set(["tapOn","inputText","pressKey","dispatchKey","hideKeyboard","swipe","pinch","scroll","scrollUntilVisible"]);function Je(e){let o=[];if(!Array.isArray(e)||e.length===0)return o.push("flow body must be a non-empty YAML array of steps"),o;let s=0;for(let a of e)a&&typeof a=="object"?Object.keys(a).some(l=>Bt.has(l))&&(s+=1):typeof a=="string"&&Bt.has(a)&&(s+=1);return s===0&&o.push("no interaction steps found (expected at least one tapOn / inputText / pressKey / swipe / scroll)"),o}function Ns(e){if(!Ne.existsSync(e))return[`file not found: ${e}`];let o;try{o=Ne.readFileSync(e,"utf8")}catch(s){return[`cannot read file: ${s.message}`]}if(o.trim().length===0)return["file is empty"];try{let s=Eo(o);return Je(s.steps)}catch(s){return[`yaml parse error: ${s.message}`]}}var Ke=1;function Me(){return Wt(process.env.SOOTSIM_FLOW_SESSION_PATH||Do(Ao(),"sootsim-flow-session.json"))}function Ue(e){let o=Me();Ct(Lt(o),{recursive:!0}),jt(o,JSON.stringify(e,null,2)+`
|
|
75
75
|
`)}function Ge(){let e=Me();if(!Ro(e))return null;try{let o=JSON.parse(Po(e,"utf8"));return o.version!==Ke||!Array.isArray(o.steps)||typeof o.startedAt!="string"||typeof o.updatedAt!="string"?(He(e,{force:!0}),null):{version:Ke,startedAt:o.startedAt,updatedAt:o.updatedAt,steps:o.steps,candidate:o.candidate??null}}catch{return He(e,{force:!0}),null}}function As(){let e=new Date().toISOString(),o={version:Ke,startedAt:e,updatedAt:e,steps:[],candidate:null};return Ue(o),{path:Me(),state:o}}function Bo(){He(Me(),{force:!0})}function Ds(){Bo()}function Fe(e){let o=Ge();if(!o)return{active:!1};let s=o.candidate,a={...o,updatedAt:new Date().toISOString(),candidate:{step:e.step,summary:e.summary,source:e.source,recordedAt:new Date().toISOString()}};return Ue(a),{active:!0,candidate:a.candidate,replaced:s}}function Bs(){let e=Ge();if(!e)return{active:!1,kept:!1,reason:"no-session"};if(!e.candidate)return{active:!0,kept:!1,reason:"no-candidate"};let o=e.candidate,s={...e,updatedAt:new Date().toISOString(),steps:[...e.steps,o.step],candidate:null};return Ue(s),{active:!0,kept:!0,candidate:o,stepCount:s.steps.length}}function Co(e){return ce.stringify(e).trimEnd()+`
|
|
76
|
-
`}function Cs(e){let o=Ge();if(!o)return{active:!1};let s=Co(o.steps),a=Je(o.steps);if(a.length>0)return{active:!0,valid:!1,issues:a,yaml:s,stepCount:o.steps.length,outputPath:null};let c=null;return e&&(c=Wt(e),Ct(Lt(c),{recursive:!0}),jt(c,s)),{active:!0,valid:!0,issues:[],yaml:s,stepCount:o.steps.length,outputPath:c}}import{existsSync as jo,mkdirSync as Lo,readFileSync as Wo,rmSync as qt,writeFileSync as qo}from"fs";import{tmpdir as Jo}from"os";import{dirname as Ho,join as Ko,resolve as Uo}from"path";var
|
|
76
|
+
`}function Cs(e){let o=Ge();if(!o)return{active:!1};let s=Co(o.steps),a=Je(o.steps);if(a.length>0)return{active:!0,valid:!1,issues:a,yaml:s,stepCount:o.steps.length,outputPath:null};let c=null;return e&&(c=Wt(e),Ct(Lt(c),{recursive:!0}),jt(c,s)),{active:!0,valid:!0,issues:[],yaml:s,stepCount:o.steps.length,outputPath:c}}import{existsSync as jo,mkdirSync as Lo,readFileSync as Wo,rmSync as qt,writeFileSync as qo}from"fs";import{tmpdir as Jo}from"os";import{dirname as Ho,join as Ko,resolve as Uo}from"path";var he=1,Go="SOOTSIM_INSPECT_NOTICE_PATH",zo=300*1e3,Yo=15e3;function Jt(){return Uo(process.env[Go]||Ko(Jo(),"sootsim-inspect-notice-state.json"))}function Xo(e,o){return Object.fromEntries(Object.entries(e).filter(([,s])=>typeof s?.signature=="string"&&Number.isFinite(s?.updatedAt)&&o-s.updatedAt<=zo))}function Vo(e){let o=Jt();if(!jo(o))return{version:he,entries:{}};try{let s=JSON.parse(Wo(o,"utf8"));return s.version!==he||!s.entries||typeof s.entries!="object"?(qt(o,{force:!0}),{version:he,entries:{}}):{version:he,entries:Xo(s.entries,e)}}catch{return qt(o,{force:!0}),{version:he,entries:{}}}}function Qo(e){let o=Jt();Lo(Ho(o),{recursive:!0}),qo(o,JSON.stringify(e,null,2)+`
|
|
77
77
|
`)}function Zo(e,o){let s=o.trim()||"default";return`${e}:${s}`}function ze(e,o,s,a={}){let c=a.nowMs??Date.now(),l=a.cooldownMs??Yo,p=Vo(c),y=Zo(e,o),b=p.entries[y];return b&&b.signature===s&&c-b.updatedAt<l?!1:(p.entries[y]={signature:s,updatedAt:c},Qo(p),!0)}async function se({bridge:e,simId:o,maxMs:s,pollMs:a=50,stablePolls:c=3,strict:l=!1}){let p=await e.send({type:"evaluate",simId:o,code:`(async () => {
|
|
78
78
|
const start = Date.now()
|
|
79
79
|
const deadline = start + ${Math.max(0,Math.round(s))}
|
|
@@ -191,7 +191,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
191
191
|
await sleep(pollMs)
|
|
192
192
|
}
|
|
193
193
|
return { settled: false, elapsed: Date.now() - start }
|
|
194
|
-
})()`},{timeoutMs:s+1e3}),{elapsed:y,settled:b}=p??{};return{elapsed:typeof y=="number"?y:s,settled:b===!0}}var es={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},ts={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function os(e,o={}){return{...e?es:ts,...o}}function pe(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function ss(e,o){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??o??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function
|
|
194
|
+
})()`},{timeoutMs:s+1e3}),{elapsed:y,settled:b}=p??{};return{elapsed:typeof y=="number"?y:s,settled:b===!0}}var es={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},ts={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function os(e,o={}){return{...e?es:ts,...o}}function pe(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function ss(e,o){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??o??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function be(e,o){let s=os(!!o.agent,o.timing),a=0,c=null,l=null;try{await se({bridge:e,maxMs:s.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let p=Date.now()+s.deadlineMs,y=null;for(;Date.now()<=p||a===0;){a++;let b=await o.resolve();if(c=b,b?.error==="bridge-not-ready"||b?.ambiguous||b?.nthOutOfRange)return{payload:b,result:null,attempts:a,failure:"special"};if(b&&typeof b.cx=="number"&&typeof b.cy=="number")if(b.offscreen){l={hit:!1,reason:"offscreen",x:b.cx,y:b.cy,screen:b.screen};let h=`${Math.round(b.cx)},${Math.round(b.cy)}`;if(y===h)return{payload:b,result:l,attempts:a,failure:"missed"};y=h}else{y=null;let h=await e.send({type:"tap",x:b.cx,y:b.cy,target:ss(b,o.textFallback)});if(l=h,pe(h))return{payload:b,result:h,attempts:a}}let _=p-Date.now();if(_<=0)break;try{await se({bridge:e,maxMs:Math.min(_,s.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(h=>setTimeout(h,Math.min(120,_)))}}return{payload:c,result:l,attempts:a,failure:c&&typeof c.cx=="number"?"missed":"not-found"}}async function Ht(e,o,s,a){return e.send({type:"tap",x:o,y:s,...a?{target:a}:{}})}async function Kt(e,o,s={}){let a=JSON.stringify(o);return be(e,{agent:s.agent,timing:s.timing,resolve:()=>e.send({type:"evaluate",code:`(async () => {
|
|
195
195
|
const t = window.__sootsimTest
|
|
196
196
|
if (!t) return null
|
|
197
197
|
const n = (await t.findByTestId(${a})) || (await t.findById(${a}))
|
|
@@ -241,7 +241,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
241
241
|
},
|
|
242
242
|
strategy: (resolved && resolved.strategy) || 'matched-node',
|
|
243
243
|
}
|
|
244
|
-
})()`})})}async function Ut(e,o,s={},a={}){let c=JSON.stringify({query:o,exact:!!s.exact,role:s.role??null,within:s.within??null,minX:s.minX??null,maxX:s.maxX??null,minY:s.minY??null,maxY:s.maxY??null,near:s.near??null,nth:s.nth??null,first:!!s.first});return
|
|
244
|
+
})()`})})}async function Ut(e,o,s={},a={}){let c=JSON.stringify({query:o,exact:!!s.exact,role:s.role??null,within:s.within??null,minX:s.minX??null,maxX:s.maxX??null,minY:s.minY??null,maxY:s.maxY??null,near:s.near??null,nth:s.nth??null,first:!!s.first});return be(e,{agent:a.agent,timing:a.timing,textFallback:o,resolve:()=>e.send({type:"evaluate",code:`(async () => {
|
|
245
245
|
const t = window.__sootsimTest
|
|
246
246
|
if (!t) return { error: 'bridge-not-ready' }
|
|
247
247
|
const F = ${c}
|
|
@@ -369,7 +369,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
369
369
|
total,
|
|
370
370
|
idx,
|
|
371
371
|
}
|
|
372
|
-
})()`})})}async function Gt(e,o,s={}){let a=JSON.stringify(o);return
|
|
372
|
+
})()`})})}async function Gt(e,o,s={}){let a=JSON.stringify(o);return be(e,{agent:s.agent,timing:s.timing,textFallback:o,resolve:async()=>{let c=await e.send({type:"evaluate",code:`(async () => {
|
|
373
373
|
const t = window.__sootsimTest
|
|
374
374
|
if (!t) return { error: 'bridge-not-ready' }
|
|
375
375
|
const byTestId =
|
|
@@ -417,16 +417,16 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
417
417
|
}
|
|
418
418
|
return { strategy: 'none' }
|
|
419
419
|
})()`});if(!c||!("node"in c))return c;let l=c.node,p=l.absolutePosition.x+l.layout.width/2,y=l.absolutePosition.y+l.layout.height/2,b=c.screen??null,_=!!b&&(p<0||y<0||p>b.width||y>b.height);return{...c,cx:p,cy:y,..._?{offscreen:!0,screen:b}:{},target:{id:l.id,testID:l.testID,text:c.strategy==="text"?o:l.text,type:l.type}}}})}async function zt(e,o={args:[]}){let s=await rt(e);if(A(o.args)){D(s);return}console.log(` nodes: ${s.nodes}`)}function Ye(e,o){let s=e.indexOf(o);return s>=0&&s+1<e.length?e[s+1]:null}async function Yt(e){let{bridge:o,args:s,positional:a}=e,c=s.includes("--verbose")||s.includes("-v"),l=A(s),p=c&&!l,y=s.includes("--watch")||s.includes("-w"),b=1e3,_=s.includes("--compact"),h=s.includes("--no-xy"),I=s.includes("--no-clipped"),M=s.includes("--include-occluded"),N=Ye(s,"--testid-like"),j=Ye(s,"--only"),O=Ye(s,"--subtree"),u=a[1]&&!a[1].startsWith("-")?a[1]:void 0,L=u?/[*?]/.test(u):!1,P=!L&&!j?u:void 0,R=j??(L?u:void 0),K=async()=>{await de(o,{verbose:p});let v=await lt(o,{describe:!0,verbose:c,filter:P||"",testIdLike:N||void 0,onlyGlob:R||void 0,subtreeRoot:O||void 0,compact:_,hideXy:h,includeOccluded:M}),F=v?.tree,J=v?.shell,H=v?.keyboard;if(l){D({shell:J,tree:F??"",keyboard:H});return}if(J&&typeof J=="object"){let C=[J.state?`state=${J.state}`:null,J.activeApp?`app=${J.activeApp}`:null,J.showSwitcher?"switcher":null,J.switcherPhase&&J.switcherPhase!=="idle"?`phase=${J.switcherPhase}`:null].filter(Boolean);C.length>0&&console.log(` shell: ${C.join(" ")}`)}if(typeof F=="string"&&F.startsWith("__SUBTREE_NOT_FOUND__:")){let C=F.slice(22);console.log(` subtree root not found: ${C}`),Q("subtree-root-not-found",C);return}if(!F){let C=v?.nodeCount??0;console.log(" no matching nodes found"),!(P||N||R||O)&&C<10&&Q("app-still-loading",C);return}let ee=F,te=0;if(I&&typeof ee=="string"){let C=ee.split(`
|
|
420
|
-
`),le=[];for(let
|
|
420
|
+
`),le=[];for(let Se of C){if(Se.includes("(clipped:")){te+=1;continue}le.push(Se)}ee=le.join(`
|
|
421
421
|
`)}console.log(ee),te>0&&console.log(` ${te} clipped row(s) hidden (omit --no-clipped to see)`);let re=P||N||R||O;if((P||N||R)&&!y&&Q("describe-filter-context"),!re&&!y&&F.split(`
|
|
422
422
|
`).length>=80&&Q("describe-use-filters"),H&&H.visible){let C=H.spec,le=[C?.keyboardType?`type=${C.keyboardType}`:null,C?.returnKeyType&&C.returnKeyType!=="default"?`return=${C.returnKeyType}`:null,H.mode!=="letters"?`mode=${H.mode}`:null,H.shifted?"shift":null,H.capsLock?"caps":null,C?.autoCapitalize&&C.autoCapitalize!=="sentences"?`autoCap=${C.autoCapitalize}`:null,H.accessoryBarId?`accessory=${H.accessoryBarId}`:null].filter(Boolean);console.log(`
|
|
423
423
|
keyboard: ${le.join(" ")||"visible"}`)}};if(y)for(console.log(` watching... (Ctrl+C to stop)
|
|
424
|
-
`);;)console.clear(),await K(),await oe(b);else await K()}var ns=["SOOTSIM_AGENT","AGENTBUS_SESSION","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function me(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let e of ns){let o=process.env[e];if(o&&o.trim()&&o!=="0")return!0}return!1}async function Xt(e){let{bridge:o,args:s,effectiveArgs:a,positional:c,inspectUsage:l}=e,p=v=>{let F=a.indexOf(v);return F>=0&&F+1<a.length?a[F+1]:null},y=v=>a.includes(v),b=p("--testid")||p("--test-id"),_=p("--role"),h=p("--type"),I=p("--text"),M=y("--pressable"),N=y("--visible"),j=y("--interactive-targets")||y("--actions"),O=!b&&!_&&!h&&!I&&!M&&!N&&!j?c[1]:null,u=I??O,L=await pt(o,{testId:b,role:_,type:h,text:u,pressable:M,visible:N,interactive:j});L||(console.error(l("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:P,result:R}=L,K=A(s),U=s.includes("--verbose")||s.includes("--dump");if(K)P==="interactive-targets"&&Array.isArray(R)?D(Be(R).map(v=>({...v,tap:Ce(v)}))):D(R??null);else if(Array.isArray(R))if(R.length===0){console.log(` no ${P} nodes found`);let v=await o.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof v=="number"&&v<10&&Q("app-still-loading",v)}else if(P==="interactive-targets"){let v=Be(R);console.log(` found ${v.length} interactive target${v.length===1?"":"s"} (sorted by score):`);for(let F of v.slice(0,20)){let J=F.absolutePosition?`@(${Math.round(F.absolutePosition.x)},${Math.round(F.absolutePosition.y)})`:"",H=F.layout?`${Math.round(F.layout.width)}x${Math.round(F.layout.height)}`:"?x?",ee=F.text?` "${F.text.slice(0,30)}"`:"",te=F.testID?` #${F.testID}`:"",re=F.accessibilityLabel?` \u24D8"${String(F.accessibilityLabel).slice(0,24)}"`:""
|
|
424
|
+
`);;)console.clear(),await K(),await oe(b);else await K()}var ns=["SOOTSIM_AGENT","AGENTBUS_SESSION","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function me(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let e of ns){let o=process.env[e];if(o&&o.trim()&&o!=="0")return!0}return!1}async function Xt(e){let{bridge:o,args:s,effectiveArgs:a,positional:c,inspectUsage:l}=e,p=v=>{let F=a.indexOf(v);return F>=0&&F+1<a.length?a[F+1]:null},y=v=>a.includes(v),b=p("--testid")||p("--test-id"),_=p("--role"),h=p("--type"),I=p("--text"),M=y("--pressable"),N=y("--visible"),j=y("--interactive-targets")||y("--actions"),O=!b&&!_&&!h&&!I&&!M&&!N&&!j?c[1]:null,u=I??O,L=await pt(o,{testId:b,role:_,type:h,text:u,pressable:M,visible:N,interactive:j});L||(console.error(l("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:P,result:R}=L,K=A(s),U=s.includes("--verbose")||s.includes("--dump");if(K)P==="interactive-targets"&&Array.isArray(R)?D(Be(R).map(v=>({...v,tap:Ce(v)}))):D(R??null);else if(Array.isArray(R))if(R.length===0){console.log(` no ${P} nodes found`);let v=await o.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof v=="number"&&v<10&&Q("app-still-loading",v)}else if(P==="interactive-targets"){let v=Be(R);console.log(` found ${v.length} interactive target${v.length===1?"":"s"} (sorted by score):`);for(let F of v.slice(0,20)){let J=F.absolutePosition?`@(${Math.round(F.absolutePosition.x)},${Math.round(F.absolutePosition.y)})`:"",H=F.layout?`${Math.round(F.layout.width)}x${Math.round(F.layout.height)}`:"?x?",ee=F.text?` "${F.text.slice(0,30)}"`:"",te=F.testID?` #${F.testID}`:"",re=F.accessibilityLabel?` \u24D8"${String(F.accessibilityLabel).slice(0,24)}"`:"",$e=F.accessibilityRole?`[${F.accessibilityRole}]`:F.type,C=Ce(F);console.log(` ${$e}${ee}${re}${te} ${H} ${J}`),console.log(` \u2192 ${C}`),U&&console.log(Xe(JSON.stringify(F,null,2)," "))}v.length>20&&console.log(` ... and ${v.length-20} more`)}else{console.log(` found ${R.length} node${R.length===1?"":"s"} (${P}):`);for(let v of R.slice(0,20)){let F=v.absolutePosition?`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`:"",J=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",H=v.text?` "${v.text.slice(0,30)}"`:"",ee=v.testID?` #${v.testID}`:"",te=v.pressable?" (tap)":"",re=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${re}${H}${ee} ${J} ${F}${te}`),U&&console.log(Xe(JSON.stringify(v,null,2)," "))}R.length>20&&console.log(` ... and ${R.length-20} more`)}else if(R==null)console.log(` not found: ${u||b||_||h||""||P}`),b&&Q("wait-selector-for-missing-testid",b);else{let v=R;if(v.type&&v.absolutePosition){let F=`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`,J=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",H=v.text?` "${v.text.slice(0,40)}"`:"",ee=v.testID?` #${v.testID}`:"",te=v.pressable?" (tap)":"",re=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${re}${H}${ee} ${J} ${F}${te}`),U&&console.log(Xe(JSON.stringify(v,null,2)," "))}else console.log(JSON.stringify(R,null,2))}}function Xe(e,o){return e.split(`
|
|
425
425
|
`).map(s=>o+s).join(`
|
|
426
426
|
`)}async function Vt(e){let{bridge:o,args:s}=e,a=A(s);await de(o,{verbose:!a});let c=s.includes("--styling"),l=await ct(o,{styling:c});if(a){D({count:l.length,elements:l});return}console.log(` layout (${l.length} element${l.length===1?"":"s"}):
|
|
427
427
|
`),console.log(ut(l,{styling:c}))}async function Qt(e,o={}){let s=await St(e);if("error"in s&&(console.error(s.error),process.exit(1)),o.json){console.log(JSON.stringify(s,null,2));return}let{visible:a,spec:c,mode:l,shifted:p,capsLock:y,accessoryBarId:b}=s,_=[];_.push(`keyboard: ${a?"visible":"hidden"}`),c?(_.push(` type: ${c.keyboardType}`),_.push(` returnKey: ${c.returnKeyType}`),_.push(` autoCap: ${c.autoCapitalize}`),_.push(` autoCorrect: ${c.autoCorrect?"on":"off"}`),_.push(` appearance: ${c.keyboardAppearance}`),c.secureTextEntry&&_.push(" secureTextEntry: true"),c.enablesReturnKeyAutomatically&&_.push(` return: ${c.currentTextIsEmpty?"disabled (empty)":"enabled"}`)):_.push(" spec: <none> (shown via dev-tools with no TextInput)"),_.push(` mode: ${l}${p?" (shifted)":""}${y?" (caps)":""}`),b&&_.push(` accessoryBar: ${b}`),console.log(_.join(`
|
|
428
428
|
`))}async function Zt(e){let o=await e.bridge.listSims(),s=e.args.includes("--all"),a=e.args.find((y,b)=>e.args[b-1]==="--bundle"),c=e.args.find((y,b)=>e.args[b-1]==="--app-port"),l=e.args.includes("--primary"),p=o.filter(y=>!(l&&!y.isPrimary||a&&!(y.url??"").includes(a)||c&&!(y.url??"").includes(`/rn/${c}`)||!s&&!a&&!c&&!l&&!(y.url&&(y.url.includes("bundle=")||y.url.includes("/index.bundle")))&&y.id!==e.simId));if(A(e.args)){D(p.map(y=>({...y,active:y.id===e.simId})));return}Pt(p,e.simId),p.length<o.length&&!A(e.args)&&console.log(` (${o.length-p.length} more hidden \u2014 pass --all to show)`)}function ae(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function rs(e,o){return o<=0?"?":`${(e/o*100).toFixed(0)}%`}function is(e){let o={},s=(a,c)=>{c&&(c.nodesRegistered!=null&&(o[`${a}.nodes`]=c.nodesRegistered),c.nodesDetached!=null&&(o[`${a}.detached`]=c.nodesDetached),c.objects&&(o[`${a}.paragraphs`]=c.objects.paragraphs,o[`${a}.yogaNodes`]=c.objects.yogaNodes,o[`${a}.pictures`]=c.objects.pictures,o[`${a}.rasterImages`]=c.objects.rasterImages),c.imageLoader&&(o[`${a}.imageCacheEntries`]=c.imageLoader.cacheEntries,o[`${a}.imagePixelBytes`]=c.imageLoader.cachePixelBytes),c.workerHeap&&(o[`${a}.heapBytes`]=c.workerHeap.usedJSHeapSize))};return s("tenant",e.tenant),s("shell",e.shell),e.hostHeap&&(o["host.heapBytes"]=e.hostHeap.usedJSHeapSize),o}function eo(e,o){return e.endsWith("Bytes")?ae(o):String(o)}function to(e,o){if(!o){console.log(` ${e}: not available`);return}let s=o.objects;if(console.log(` ${e}`),o.nodesRegistered!=null&&console.log(` nodes registered: ${o.nodesRegistered}`),o.nodesDetached!=null){let a=Object.entries(o.detachedTypes??{}).map(([c,l])=>`${c}:${l}`).join(" ");console.log(` nodes detached: ${o.nodesDetached}${a?` (${a})`:""}`)}if(s&&(console.log(` paragraphs: ${s.paragraphs}`),console.log(` yoga nodes: ${s.yogaNodes}`),console.log(` pictures: ${s.pictures}`),console.log(` raster images: ${s.rasterImages}`)),o.activeNativeAnimations!=null&&console.log(` native anims: ${o.activeNativeAnimations}`),o.imageLoader){let a=o.imageLoader;console.log(` image cache: ${a.cacheEntries}/${a.cacheMaxEntries} entries, ${ae(a.cachePixelBytes)}/${ae(a.cachePixelBudget)} (${rs(a.cachePixelBytes,a.cachePixelBudget)})`)}o.workerHeap&&console.log(` js heap: ${ae(o.workerHeap.usedJSHeapSize)} used / ${ae(o.workerHeap.totalJSHeapSize)} total`)}function as(e){console.log(" memory:"),to("tenant worker",e.tenant),to("shell worker",e.shell),e.hostHeap?(console.log(" host"),console.log(` js heap: ${ae(e.hostHeap.usedJSHeapSize)} used / ${ae(e.hostHeap.totalJSHeapSize)} total`)):console.log(" host js heap: not available (chrome only)")}function ls(e,o,s){let a=e.indexOf(o);if(a===-1)return s;let c=Number(e[a+1]);return Number.isFinite(c)&&c>0?c:s}async function oo(e,o={args:[]}){let s=A(o.args),a=o.args.indexOf("--watch");if(a===-1){let O=await We(e);if(s){D(O);return}as(O);return}let c=Number(o.args[a+1]),l=Number.isFinite(c)&&c>0?c:60,p=ls(o.args,"--interval",5),y=[],b=Date.now(),_=null;for(s||console.log(` sampling every ${p}s for ${l}s \u2014 deltas per tick:`);;){let O=await We(e),u=(Date.now()-b)/1e3,L=is(O);if(y.push({tSec:u,counters:L}),!s){let P=[];for(let[R,K]of Object.entries(L)){let U=_&&R in _?K-_[R]:null;if(U===null||U===0)continue;let v=U>0?"+":"-",F=R.endsWith("Bytes")?`${v}${ae(Math.abs(U))}`:`${v}${Math.abs(U)}`;P.push(`${R} ${eo(R,K)} (${F})`)}console.log(` t+${u.toFixed(0)}s ${P.length?P.join(" "):_?"no change":Object.entries(L).map(([R,K])=>`${R} ${eo(R,K)}`).join(" ")}`)}if(_=L,u>=l)break;await new Promise(P=>setTimeout(P,p*1e3))}let h=y[0],I=y[y.length-1],M=Math.max(I.tSec-h.tSec,.001),N={};for(let O of Object.keys(I.counters))O in h.counters&&(N[O]=(I.counters[O]-h.counters[O])/M);if(s){D({samples:y,perSecond:N,elapsedSec:M});return}console.log(`
|
|
429
|
-
slope over ${M.toFixed(0)}s:`);let j=Object.entries(N).filter(([,O])=>O!==0).sort((O,u)=>Math.abs(u[1])-Math.abs(O[1]));if(j.length===0){console.log(" all counters flat");return}for(let[O,u]of j){let L=O.endsWith("Bytes")?`${ae(Math.abs(u))}/s${u<0?" (shrinking)":""}`:`${u>0?"+":""}${u.toFixed(2)}/s`;console.log(` ${O.padEnd(28)}${L}`)}}var Z="<redacted secure text>";function
|
|
429
|
+
slope over ${M.toFixed(0)}s:`);let j=Object.entries(N).filter(([,O])=>O!==0).sort((O,u)=>Math.abs(u[1])-Math.abs(O[1]));if(j.length===0){console.log(" all counters flat");return}for(let[O,u]of j){let L=O.endsWith("Bytes")?`${ae(Math.abs(u))}/s${u<0?" (shrinking)":""}`:`${u>0?"+":""}${u.toFixed(2)}/s`;console.log(` ${O.padEnd(28)}${L}`)}}var Z="<redacted secure text>";function we(e){let o=e?.layout?.spec??e?.spec??null;return!!o?.secureTextEntry&&o.keyboardType!=="visible-password"}function Ve(e,o){return we(o)?Z:e}function Qe(e){if(!e||!we(e))return e;let o=e.focusedInput;return!o||typeof o!="object"?e:{...e,focusedInput:{...o,secureTextEntry:!0,text:typeof o.text=="string"?Z:o.text}}}function xe(e){let o=e.indexOf("--testid");if(o>=0&&e[o+1])return{mode:"testid",value:e[o+1]};let s=e.indexOf("--test-id");if(s>=0&&e[s+1])return{mode:"testid",value:e[s+1]};let a=e.indexOf("--text");return a>=0&&e[a+1]?{mode:"text",value:e[a+1]}:null}async function Oe(e,o){let s=JSON.stringify(o.value),a=o.mode==="testid"?`(await t.findByTestId(${s})) || (await t.findById(${s}))`:`await t.findByText(${s})`;return await e.send({type:"evaluate",code:`(async () => {
|
|
430
430
|
const t = window.__sootsimTest
|
|
431
431
|
if (!t) return null
|
|
432
432
|
const n = ${a}
|
|
@@ -456,7 +456,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
456
456
|
const t = window.SootSim?.bridges?.timeline
|
|
457
457
|
if (!t) return { ok: false, error: 'timeline bridge missing' }
|
|
458
458
|
return { ok: true, result: await t.recent(${JSON.stringify(L)}) }
|
|
459
|
-
})()`});(!P||!P.ok)&&(console.error(` could not query timeline: ${P&&"error"in P?P.error:"unknown"}`),process.exit(1));let R=P.result.events??[];for(let K of R)if(cs(K,{filter:b,equals:_})){let U=Date.now()-M;console.log(I?JSON.stringify({found:!0,elapsedMs:U,event:K}):` ${l} event after ${U}ms${b?` (filter: ${b})`:""}${_?` (equals: ${_})`:""}`);return}P.result.watermark&&P.result.watermark>O&&(O=P.result.watermark),await new Promise(K=>setTimeout(K,j))}let u=Date.now()-M;I?console.log(JSON.stringify({found:!1,elapsedMs:u,kind:l,filter:b,equals:_})):console.error(` \u26A0 wait event ${l} timed out after ${u}ms${b?` (filter: ${b})`:""}${_?` (equals: ${_})`:""}`),process.exit(1)}async function po(e){let{bridge:o,args:s}=e,a=s.includes("--strict"),c=
|
|
459
|
+
})()`});(!P||!P.ok)&&(console.error(` could not query timeline: ${P&&"error"in P?P.error:"unknown"}`),process.exit(1));let R=P.result.events??[];for(let K of R)if(cs(K,{filter:b,equals:_})){let U=Date.now()-M;console.log(I?JSON.stringify({found:!0,elapsedMs:U,event:K}):` ${l} event after ${U}ms${b?` (filter: ${b})`:""}${_?` (equals: ${_})`:""}`);return}P.result.watermark&&P.result.watermark>O&&(O=P.result.watermark),await new Promise(K=>setTimeout(K,j))}let u=Date.now()-M;I?console.log(JSON.stringify({found:!1,elapsedMs:u,kind:l,filter:b,equals:_})):console.error(` \u26A0 wait event ${l} timed out after ${u}ms${b?` (filter: ${b})`:""}${_?` (equals: ${_})`:""}`),process.exit(1)}async function po(e){let{bridge:o,args:s}=e,a=s.includes("--strict"),c=ke(s,3e3),{elapsed:l,settled:p}=await se({bridge:o,maxMs:c,strict:a});p?console.log(` idle in ${l}ms`):(console.error(` \u26A0 wait idle timed out after ${l}ms (may still be animating)`),process.exit(1))}async function mo(e){let{bridge:o,args:s}=e,a=ke(s,2e4),{ready:c,elapsedMs:l,nodes:p,targets:y,flag:b,loadingText:_,externalReady:h,externalError:I,suppressedEntryError:M,errors:N,bridgeError:j}=await mt(o,a,{onProgress(u){console.error(` still waiting after ${u.elapsedMs}ms \u2014 ${je(u)} (nodes: ${u.nodes}, targets: ${u.targets}, errors: ${u.errors})`)}});if(c){let u=a-l,L=Math.max(100,Math.min(1e4,u)),P=await se({bridge:o,maxMs:L,pollMs:32,stablePolls:2});P.settled||(console.error(` \u26A0 wait ready timed out after ${l+P.elapsed}ms \u2014 app mounted but did not settle (nodes: ${p}, targets: ${y})`),process.exit(1)),console.log(` ready in ${l+P.elapsed}ms: ${p} nodes, ${y} targets`);return}let O=je({externalError:I,loadingText:_,externalReady:h,flag:b,targets:y,suppressedEntryError:M,bridgeError:j});console.error(` \u26A0 wait ready timed out after ${l}ms \u2014 ${O} (nodes: ${p}, targets: ${y}, errors: ${N})`),process.exit(1)}async function fo(e){let{bridge:o,args:s,positional:a,inspectUsage:c}=e,l=a[1];l||(console.error(c("wait selector","<testid> [--max-ms 5000] [--gone]")),process.exit(1));let p=s.indexOf("--max-ms"),y=p>=0&&s[p+1]?Math.max(100,Number(s[p+1])):5e3,b=s.includes("--gone"),{found:_,node:h,elapsed:I}=await ft(o,l,y,{gone:b});if(b){_?console.log(` #${l} gone after ${I}ms`):(console.error(` \u26A0 wait selector #${l} --gone timed out after ${I??y}ms (still present)`),process.exit(1));return}if(_&&h){let M=h.absolutePosition?`@(${Math.round(h.absolutePosition.x)},${Math.round(h.absolutePosition.y)})`:"",N=h.layout?`${Math.round(h.layout.width)}x${Math.round(h.layout.height)}`:"?x?";console.log(` found #${l} in ${I}ms ${N} ${M}`)}else console.error(` \u26A0 wait selector #${l} timed out after ${I??y}ms`),process.exit(1)}function ko(e){return e==null?"\u2014":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}K`:`${(e/1024/1024).toFixed(1)}M`}function _o(e){return e==null?" \u2026":e<1e3?`${e}ms`.padStart(5):`${(e/1e3).toFixed(2)}s`.padStart(5)}function go(){process.stderr.write(` the sim is not responding. recover it with:
|
|
460
460
|
sootsim close --sim <id> # force-close the wedged sim
|
|
461
461
|
sootsim list # confirm it's gone
|
|
462
462
|
`)}async function ds(e){try{return await e.send({type:"evaluate",code:"1"},{timeoutMs:3e3}),!0}catch{return!1}}async function ps(e,o){try{let s=await e.send({type:"evaluate",code:`(async () => {
|
|
@@ -517,7 +517,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
517
517
|
frame: runtimeSnapshot?.keyboard?.frame ?? null,
|
|
518
518
|
focusedRect: runtimeSnapshot?.focused?.rect ?? null,
|
|
519
519
|
}
|
|
520
|
-
})()`}).then(o=>Qe(o))}function xs(e,o,s){if(!e.visible)return!1;let a=e.focusedInput;return!(o&&a&&!(a.testID===o||a.id===o)||s!==null&&
|
|
520
|
+
})()`}).then(o=>Qe(o))}function xs(e,o,s){if(!e.visible)return!1;let a=e.focusedInput;return!(o&&a&&!(a.testID===o||a.id===o)||s!==null&&we(e)!==s)}async function $s(e,o=600,s={}){let a=Date.now()+o;for(;Date.now()<=a;){let c=await et(e);if(xs(c,s.targetId??null,s.secureTextEntry??null))return c;await oe(30)}return et(e)}async function Pe(e,o){let s=await et(e);if(s.visible&&s.focusedInput)return s;s.visible&&(console.error(` ${o} requires a focused TextInput. the iOS keyboard is visible, but no input owns focus.`),process.exit(1)),console.error(` ${o} requires the iOS keyboard to be visible. focus an input first with sootsim do tap-id/tap-text or sootsim do type-into.`),process.exit(1)}async function So(e,o,s){return o==="appearance"?e.send({type:"evaluate",code:`(async () => {
|
|
521
521
|
const requested = ${JSON.stringify(s??"toggle")}
|
|
522
522
|
// the engine owns toggle + auto resolution (settingsStore is the single
|
|
523
523
|
// source of truth). never infer the current scheme client-side \u2014 the old
|
|
@@ -547,19 +547,19 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
547
547
|
`);console.log(`${t??""}
|
|
548
548
|
|
|
549
549
|
${n}
|
|
550
|
-
`),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-
|
|
550
|
+
`),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-TWMUMITQ.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(y==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-ALWQVYHU.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-AK6KP6X4.js"),t=x();console.log(` available drivers (${t.length}):
|
|
551
551
|
`);let n=Math.max(...t.map(i=>i.id.length),6),r=Math.max(...t.map(i=>i.kind.length),4);for(let i of t){let d=i.available?"\u2713":"\u2717",m=i.id.padEnd(n),f=i.kind.padEnd(r);console.log(` ${d} ${m} ${f} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let u=It(c),L=N||"default",P=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),R=200;function K(x){let t=x.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(x)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(x)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||i||"html error page";return`<html ${x.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=R?t:`${t.slice(0,R)}\u2026 (+${t.length-R} more bytes)`}function U(x){let t=x.displayUrl||x.url;return x.status!=null?`${x.method} ${t} -> ${x.status}${x.statusText?` ${x.statusText}`:""}`:x.error?`${x.method} ${t} -> ${x.error}`:`${x.method} ${t}`}async function v(x){let t=me()?400:200;try{let{settled:n,elapsed:r}=await se({bridge:x,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
552
552
|
`)}catch{}}function F(x,t){if(t.result?.reason==="offscreen"){let{x:n,y:r,screen:i}=t.result;console.error(` tap failed: ${x} resolved to (${Math.round(n)},${Math.round(r)}), outside the ${i?.width}x${i?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (sootsim do scroll / swipe), then tap.");return}console.error(` tap failed: ${x} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function J(){try{return await u.send({type:"evaluate",code:`(() => ({
|
|
553
|
-
console: ${
|
|
553
|
+
console: ${_e},
|
|
554
554
|
requests: window.__sootsimTest?.getRequestCounts?.() || null,
|
|
555
|
-
}))()`})||{console:null,requests:null}}catch{return{console:null,requests:null}}}async function H(x={}){let t=x.counts!==void 0?x.counts:await
|
|
556
|
-
network: ${n} failed request${n===1?"":"s"}`),console.log(` inspect: ${h("requests")} 5`),!x.includeTail))return;let r=await
|
|
555
|
+
}))()`})||{console:null,requests:null}}catch{return{console:null,requests:null}}}async function H(x={}){let t=x.counts!==void 0?x.counts:await X(u,"getRequestCounts");if(!t||typeof t!="object")return;let n=Math.max(0,Number(t.failed)||0);if(n===0||!x.includeTail&&!ze("requests",L,String(n))||(console.log(`
|
|
556
|
+
network: ${n} failed request${n===1?"":"s"}`),console.log(` inspect: ${h("requests")} 5`),!x.includeTail))return;let r=await X(u,"getFailedRequests",5);if(!(!Array.isArray(r)||r.length===0)){console.log(`
|
|
557
557
|
recent failed requests:
|
|
558
558
|
`);for(let i of r){let d=ie(i.timestamp);console.log(` [${d}] ${U(i)}`),i.responseBody?console.log(` ${K(i.responseBody)}`):i.error&&console.log(` ${i.error}`)}}}function ee(x){for(let t of x){let n=t.title?` (\u201C${t.title}\u201D)`:"";console.log(`
|
|
559
|
-
note: ${t.label} is open${n} \u2014 taps/drags hit it, not the app`)}}async function te(x={}){let t=x.counts!==void 0?x.counts:await u.send({type:"evaluate",code:
|
|
559
|
+
note: ${t.label} is open${n} \u2014 taps/drags hit it, not the app`)}}async function te(x={}){let t=x.counts!==void 0?x.counts:await u.send({type:"evaluate",code:_e});if(!t||typeof t!="object")return;let n=t,r=Math.max(0,Number(n.errors)||0),i=Math.max(0,Number(n.warnings)||0);if(r===0&&i===0||!x.includeTail&&!ze("console",L,`${r}:${i}`))return;let d=[];if(r>0&&d.push(`${r} console error${r===1?"":"s"}`),i>0&&d.push(`${i} console warning${i===1?"":"s"}`),console.log(`
|
|
560
560
|
console: ${d.join(", ")}`),console.log(` inspect: ${h("errors")} 5`),i>0&&console.log(` inspect: ${h("warnings")} 5`),!x.includeTail||r===0)return;let m=await fe(u,5);if(!(!Array.isArray(m)||m.length===0)){console.log(`
|
|
561
561
|
recent console errors:
|
|
562
|
-
`);for(let f of m){let w=ie(f.timestamp),g=Array.isArray(f.args)?f.args.map(S=>typeof S=="object"?JSON.stringify(S):String(S)).join(" "):String(f);console.log(` [${w}] ${g}`)}}}let re=["console","fetch","toast","alert","notification","screen","app-launch","keyboard","route","actionsheet","picker","shell","scroll","gesture","text-input","animation","reanimated"];async function
|
|
562
|
+
`);for(let f of m){let w=ie(f.timestamp),g=Array.isArray(f.args)?f.args.map(S=>typeof S=="object"?JSON.stringify(S):String(S)).join(" "):String(f);console.log(` [${w}] ${g}`)}}}let re=["console","fetch","toast","alert","notification","screen","app-launch","keyboard","route","actionsheet","picker","shell","scroll","gesture","text-input","animation","reanimated"];async function $e(x){let t=st(),n=null;try{n=await Nt(x,`(() => {
|
|
563
563
|
const tl = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.timeline
|
|
564
564
|
if (!tl || typeof tl.summary !== 'function') return null
|
|
565
565
|
const cursorKey = ${JSON.stringify(t)}
|
|
@@ -576,7 +576,7 @@ ${n}
|
|
|
576
576
|
}
|
|
577
577
|
return summary ? { summary, consoleSplit } : null
|
|
578
578
|
})()`)}catch{return}if(!n||!n.summary||!n.summary.total)return;let r=n.summary.byKind??{},i=[],d=new Set;for(let m of re){let f=r[m];if(f)if(d.add(m),m==="console"&&n.consoleSplit){let{error:w,warn:g}=n.consoleSplit;w>0&&i.push(`${w} error${w===1?"":"s"}`),g>0&&i.push(`${g} warning${g===1?"":"s"}`)}else i.push(`${f} ${m}${f===1?"":"s"}`)}for(let[m,f]of Object.entries(r))!d.has(m)&&f&&i.push(`${f} ${m}${f===1?"":"s"}`);if(i.length!==0&&(console.log(`
|
|
579
|
-
since last: ${i.join(" \xB7 ")} \u2014 sootsim what-happened`),n.summary.lastAt))try{await
|
|
579
|
+
since last: ${i.join(" \xB7 ")} \u2014 sootsim what-happened`),n.summary.lastAt))try{await ge(x,"SootSim.bridges.timeline.cursorAdvance",t,n.summary.lastAt)}catch{}}let C=new Set(["tap","double-tap","tap-text","tap-id","type","type-into","key","key-sequence","keycode","drag","swipe","long-press","touch","gesture","pinch","scroll","shell","storage-clear"]),le=new Set(["a11y","capture","count","double-tap","drag","find","gesture","layout","long-press","node","pinch","sample-color","scroll","screenshot","swipe","tap","tap-id","tap-text","touch","tree","type-into"]),Se=(e.includes("--verbose")||e.includes("-v"))&&!e.includes("--json");y==="do"&&p==="shell"&&(console.error(" `sootsim do shell` was removed. use `sootsim shell ...` instead."),process.exit(1)),C.has(p)&&await Tt(u),le.has(p)&&await de(u,{verbose:Se});try{let x=C.has(p)&&!A(a)?await $t(u):[];switch(p){case"list":{kt(c.wsPort),await Zt({bridge:u,simId:N,args:a});break}case"tree":{await io({bridge:u,args:a,positional:l});break}case"a11y":{let t=await dt(u);if(!Array.isArray(t)||t.length===0){console.log(" no accessible nodes found");break}if(e.includes("--json"))console.log(JSON.stringify(t,null,2));else{console.log(` accessibility tree (${t.length} nodes):
|
|
580
580
|
`);for(let n of t){let r=[];if(r.push(`[${n.role}]`),n.label){let i=n.label.length>50?n.label.slice(0,47)+"...":n.label;r.push(`"${i}"`)}if(n.hint&&r.push(`(hint: "${n.hint}")`),n.testID&&r.push(`#${n.testID}`),n.state){let i=[];n.state.disabled&&i.push("disabled"),n.state.selected&&i.push("selected"),n.state.checked===!0&&i.push("checked"),n.state.checked==="mixed"&&i.push("mixed"),n.state.busy&&i.push("busy"),n.state.expanded===!0&&i.push("expanded"),n.state.expanded===!1&&i.push("collapsed"),i.length&&r.push(`{${i.join(", ")}}`)}n.position&&r.push(`@(${n.position.x},${n.position.y})`),n.size&&r.push(`${n.size.w}x${n.size.h}`),console.log(" "+r.join(" "))}}break}case"find":{await Xt({bridge:u,args:e,effectiveArgs:a,positional:l,inspectUsage:I});break}case"count":{await zt(u,{args:a});break}case"keyboard":{await Qt(u,{json:e.includes("--json")});break}case"screens":{await so(u,{json:e.includes("--json")});break}case"memory":{await oo(u,{args:a});break}case"wait":{await lo({wsPort:M,commandTimeoutMs:O,simId:N,simIdSource:j,positional:l});break}case"sleep":{await ro({positional:l,inspectUsage:I});break}case"settle":{await no({bridge:u,args:e,positional:l});break}case"ready":{await mo({bridge:u,args:e});break}case"idle":{await po({bridge:u,args:e,positional:l});break}case"selector":{await fo({bridge:u,args:e,positional:l,inspectUsage:I});break}case"event":{await uo({bridge:u,args:e,positional:l,inspectUsage:I});break}case"layout":{let t=l[1];if(!t){await Vt({bridge:u,args:a});break}let n=await u.send({type:"evaluate",code:`(async () => await window.__sootsimTest.getLayout(${JSON.stringify(t)}))()`});console.log(JSON.stringify(n,null,2));break}case"capture":case"screenshot":{let n=e.find((w,g)=>e[g-1]==="--output")||"/tmp/sootsim-inspect.png",r=await xo(e,u),i={type:"screenshot"};r&&(i.crop=r);let m=(await u.send(i)).replace(/^data:image\/png;base64,/,"");r&&console.log(` area: x=${r.x} y=${r.y} w=${r.w} h=${r.h}`),(await import("fs")).writeFileSync(n,Buffer.from(m,"base64")),console.log(` saved: ${n}`);break}case"sample-color":{let t=await xo(e,u);t||(console.error(I("sample-color","<x> <y> [w] [h] | --id <testID> | --text <text>")),console.error(" samples an averaged color from the canvas. coords are logical sootsim units."),process.exit(1));let n=await u.send({type:"evaluate",code:Dt(t)});if(e.includes("--json"))console.log(JSON.stringify(n,null,2));else{let{r,g:i,b:d,a:m,hex:f,samples:w}=n,g=t.w===1&&t.h===1?`@(${t.x},${t.y})`:`@(${t.x},${t.y}) ${t.w}x${t.h}`;console.log(` ${f} rgba(${r}, ${i}, ${d}, ${m}) ${g} ${w} samples`)}break}case"node":{let t=l[1];t||(console.error(I("node","<matcher>")),console.error(" resolves testID, id, then text \u2014 dumps full node info as JSON"),process.exit(1));let n=await u.send({type:"evaluate",code:`(async () => {
|
|
581
581
|
const t = window.__sootsimTest
|
|
582
582
|
const q = ${JSON.stringify(t)}
|
|
@@ -633,7 +633,7 @@ ${n}
|
|
|
633
633
|
transform,
|
|
634
634
|
parentChain,
|
|
635
635
|
}
|
|
636
|
-
})()`});console.log(JSON.stringify(n,null,2));break}case"tap":{let t=Number(l[1]),n=Number(l[2]),r=
|
|
636
|
+
})()`});console.log(JSON.stringify(n,null,2));break}case"tap":{let t=Number(l[1]),n=Number(l[2]),r=xe(e);if(r){let m=await be(u,{agent:me(),textFallback:r.mode==="text"?r.value:void 0,resolve:async()=>{let g=await Oe(u,r);return g?{cx:g.x,cy:g.y,match:{id:r.mode==="testid"?r.value:g.id??null,testID:r.mode==="testid"?r.value:g.testID??null,text:r.mode==="text"?r.value:g.text??null,type:g.type??null},target:{id:g.id??null,testID:g.testID??null,text:g.text??null,type:g.type??null}}:null}}),f=m.payload;(!f||typeof f.cx!="number")&&(console.error(` not found: ${r.value}`),r.mode==="testid"&&Q("wait-selector-for-missing-testid",r.value),process.exit(1)),pe(m.result)||(F(`${r.mode} "${r.value}"`,m),process.exit(1));let w=vo(f.cx,f.cy,m.result);w&&await q("inspect tap",w.step,w.summary),console.log(JSON.stringify({...m.attempts>1?{attempts:m.attempts}:{},...m.result},null,2));break}(!Number.isFinite(t)||!Number.isFinite(n))&&(console.error(I("tap","<x> <y> | --testid <id> | --text <t>")),process.exit(1));let i=await Ht(u,t,n),d=vo(t,n,i);d&&await q("inspect tap",d.step,d.summary),console.log(JSON.stringify(i,null,2));break}case"drag":case"swipe":{let t=Number(l[1]),n=Number(l[2]),r=Number(l[3]),i=Number(l[4]),d=p==="swipe"?10:12,m=p==="swipe"?8:16,f=l[5]?Number(l[5]):d,w=l[6]?Number(l[6]):m;(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(f)||!Number.isFinite(w))&&(console.error(I(p,"<x1> <y1> <x2> <y2> [steps] [stepMs]")),process.exit(1));let g=await u.send({type:"evaluate",code:`(async () => {
|
|
637
637
|
const interact = window.__sootsimInteract
|
|
638
638
|
if (!interact?.drag) return { ok: false, reason: 'no interact.drag' }
|
|
639
639
|
const value = await interact.drag(${t}, ${n}, ${r}, ${i}, ${Math.max(1,Math.round(f))}, ${Math.max(0,Math.round(w))})
|
|
@@ -643,7 +643,7 @@ ${n}
|
|
|
643
643
|
if (!interact?.pinch) return { ok: false, reason: 'no interact.pinch' }
|
|
644
644
|
const value = await interact.pinch(${t}, ${n}, ${r}, ${i}, ${d}, ${m}, ${f}, ${w}, ${Math.max(1,Math.round(g))}, ${Math.max(0,Math.round(S))})
|
|
645
645
|
return { ok: !!value, value }
|
|
646
|
-
})()`});W?.ok&&await q("inspect pinch",{pinch:{from:[t,n,r,i],to:[d,m,f,w],steps:Math.max(1,Math.round(g)),stepMs:Math.max(0,Math.round(S))}},`pinch (${t},${n}) (${r},${i}) -> (${d},${m}) (${f},${w})`),console.log(JSON.stringify(W,null,2));break}case"tap-text":{let t=l[1];t||(console.error(I("tap-text","<text>")),process.exit(1));let n=Y=>{let B=e.indexOf(Y);return B>=0&&B+1<e.length?e[B+1]:null},r=Y=>e.includes(Y),i=n("--nth")??n("--index"),d=i!==null?Number(i):null;d!==null&&!Number.isFinite(d)&&(console.error(` --nth/--index requires an integer, got: ${i}`),process.exit(1));let m=n("--within"),f=n("--role"),w=r("--exact"),g=r("--first"),S=n("--min-y"),W=n("--max-y"),
|
|
646
|
+
})()`});W?.ok&&await q("inspect pinch",{pinch:{from:[t,n,r,i],to:[d,m,f,w],steps:Math.max(1,Math.round(g)),stepMs:Math.max(0,Math.round(S))}},`pinch (${t},${n}) (${r},${i}) -> (${d},${m}) (${f},${w})`),console.log(JSON.stringify(W,null,2));break}case"tap-text":{let t=l[1];t||(console.error(I("tap-text","<text>")),process.exit(1));let n=Y=>{let B=e.indexOf(Y);return B>=0&&B+1<e.length?e[B+1]:null},r=Y=>e.includes(Y),i=n("--nth")??n("--index"),d=i!==null?Number(i):null;d!==null&&!Number.isFinite(d)&&(console.error(` --nth/--index requires an integer, got: ${i}`),process.exit(1));let m=n("--within"),f=n("--role"),w=r("--exact"),g=r("--first"),S=n("--min-y"),W=n("--max-y"),V=n("--min-x"),G=n("--max-x");for(let[Y,B]of[["--min-y",S],["--max-y",W],["--min-x",V],["--max-x",G]])B!==null&&!Number.isFinite(Number(B))&&(console.error(` ${Y} requires a number, got: ${B}`),process.exit(1));let z=e.indexOf("--near"),E=null;if(z>=0){let Y=Number(e[z+1]),B=Number(e[z+2]);(!Number.isFinite(Y)||!Number.isFinite(B))&&(console.error(" --near requires two numbers: --near <x> <y>"),process.exit(1)),E={x:Y,y:B}}let $={exact:w,role:f,within:m,minX:V!==null?Number(V):null,maxX:G!==null?Number(G):null,minY:S!==null?Number(S):null,maxY:W!==null?Number(W):null,near:E,nth:d,first:g},k=await Ut(u,t,$,{agent:me()}),T=k.payload;if(T?.error==="bridge-not-ready"&&(console.error(" sootsim test bridge not ready"),process.exit(1)),T?.ambiguous){let Y=T.candidates;console.error(` ambiguous: ${T.total} matches for "${t}"`);for(let B of Y){let ve=B.abs?`@(${Math.round(B.abs.x)},${Math.round(B.abs.y)})`:"",To=B.layout?` ${B.layout.width}x${B.layout.height}`:"",No=B.testID?` #${B.testID}`:"",Mo=B.text?` "${B.text}"`:"",Fo=B.ancestorTestIDs.length>0?` within ${B.ancestorTestIDs.slice(0,3).map(Oo=>`#${Oo}`).join(" > ")}`:"";console.error(` [${B.idx}] <${B.type}>${Mo}${No} ${ve}${To}${Fo}`)}T.total>Y.length&&console.error(` ... and ${T.total-Y.length} more`),console.error(" pick one:"),console.error(" --nth <index> pick the nth match (top-to-bottom, left-to-right; negatives from end)"),console.error(" --within <testID> narrow to descendants of a node"),console.error(" --min-y / --max-y geometric filter (pixels, absolute)"),console.error(" --min-x / --max-x geometric filter (pixels, absolute)"),console.error(" --near <x> <y> pick the closest match to a point"),console.error(" --exact exact text match (default is substring)"),console.error(" --role <role> narrow to accessibilityRole"),console.error(" --first keep the old pick-first-silently behavior"),process.exit(2)}T?.nthOutOfRange&&(console.error(` not found: nth ${T.nth} of ${T.total} match${T.total===1?"":"es"} for "${t}"`),process.exit(1)),(!T||typeof T.cx!="number")&&(console.error(` not found: ${t}`),process.exit(1)),pe(k.result)||(F(`text "${t}"`,k),process.exit(1));let ne=Ze(t,{id:T.target?.id??null,testID:T.target?.testID??null,type:T.target?.type??null,cx:T.cx,cy:T.cy},"text");await q("inspect tap-text",ne.step,ne.summary),console.log(JSON.stringify({matched:T.match,tapped:{nodeId:T.target?.nodeId??null,id:T.target?.id??null,testID:T.target?.testID??null,type:T.target?.type??null,cx:T.cx,cy:T.cy},...T.strategy&&T.strategy!=="matched-node"?{strategy:T.strategy}:{},...T.total>1||d!==null?{nth:{index:T.idx,total:T.total}}:{},...k.attempts>1?{attempts:k.attempts}:{},result:k.result},null,2));break}case"tap-best":{let t=l[1];t||(console.error(I("tap-best","<query>")),process.exit(1));let n=await Gt(u,t,{agent:me()}),r=n.payload;r||(console.error(` tap-best: no testID or visible text matched "${t}". try \`sootsim find --interactive-targets\` to list candidates.`),process.exit(1)),"error"in r&&(console.error(` ${r.error}`),process.exit(1)),r.strategy==="none"&&(console.error(` tap-best: no testID or visible text matched "${t}". try \`sootsim find --interactive-targets\` to list candidates.`),process.exit(1));let i=r.node;pe(n.result)||(F(`best "${t}"`,n),process.exit(1));let d=Ze(t,{id:i.id,testID:i.testID,type:i.type,cx:r.cx,cy:r.cy},r.strategy==="testid"?"id":"text");await q("inspect tap-best",d.step,d.summary),console.log(JSON.stringify({matched:{strategy:r.strategy,nodeId:i.nodeId,id:i.id,testID:i.testID,type:i.type,text:i.text},tapped:{cx:r.cx,cy:r.cy},...n.attempts>1?{attempts:n.attempts}:{},result:n.result},null,2));break}case"tap-id":{let t=l[1];t||(console.error(I("tap-id","<id>")),process.exit(1));let n=await Kt(u,t,{agent:me()}),r=n.payload;(!r||typeof r.cx!="number")&&(console.error(` not found: ${t}`),await ps(u,t),process.exit(1)),pe(n.result)||(F(`id "${t}"`,n),process.exit(1));let i=Ze(t,{id:r.target?.id??null,testID:r.target?.testID??null,type:r.target?.type??null,cx:r.cx,cy:r.cy},"id");await q("inspect tap-id",i.step,i.summary),console.log(JSON.stringify({matched:r.match,tapped:{nodeId:r.target?.nodeId??null,id:r.target?.id??null,testID:r.target?.testID??null,type:r.target?.type??null,cx:r.cx,cy:r.cy},...r.strategy&&r.strategy!=="matched-node"?{strategy:r.strategy}:{},...n.attempts>1?{attempts:n.attempts}:{},result:n.result},null,2));break}case"type-into":{let t=l[1],n=l.slice(2).join(" ");(!t||!n)&&(console.error(I("type-into","<id> <text>")),process.exit(1));let r=JSON.stringify(t),i=await u.send({type:"evaluate",code:`(async () => {
|
|
647
647
|
const t = window.__sootsimTest
|
|
648
648
|
if (!t) return null
|
|
649
649
|
const n = await (t.findByTestId(${r}) || t.findById(${r}))
|
|
@@ -658,7 +658,7 @@ ${n}
|
|
|
658
658
|
secureTextEntry: !!n.secureTextEntry,
|
|
659
659
|
placeholder: n.placeholder || null,
|
|
660
660
|
}
|
|
661
|
-
})()`});(!i||typeof i.cx!="number")&&(console.error(` not found: ${t}`),process.exit(1)),i.isTextInput||console.error(` warning: ${t} is not a text input (isTextInput: false)`);let d=await u.send({type:"tap",x:i.cx,y:i.cy,target:{id:i.id??t,testID:i.testID??t,text:null,type:i.type??null}}),m=i.secureTextEntry===!0,f=await $s(u,1e3,{targetId:t,secureTextEntry:m});f.visible||(console.error(` keyboard did not open after tapping ${t}`),process.exit(1));let w=f.focusedInput;w&&(w.testID===t||w.id===t||(console.error(` focus routing mismatch after tap: requested ${JSON.stringify(t)} but focus is on ${JSON.stringify(w.testID??w.id??null)}. did the tap land on an outer Pressable wrapper?`),process.exit(1))),await u.send({type:"keyboard",action:"type",text:n});let g=m||
|
|
661
|
+
})()`});(!i||typeof i.cx!="number")&&(console.error(` not found: ${t}`),process.exit(1)),i.isTextInput||console.error(` warning: ${t} is not a text input (isTextInput: false)`);let d=await u.send({type:"tap",x:i.cx,y:i.cy,target:{id:i.id??t,testID:i.testID??t,text:null,type:i.type??null}}),m=i.secureTextEntry===!0,f=await $s(u,1e3,{targetId:t,secureTextEntry:m});f.visible||(console.error(` keyboard did not open after tapping ${t}`),process.exit(1));let w=f.focusedInput;w&&(w.testID===t||w.id===t||(console.error(` focus routing mismatch after tap: requested ${JSON.stringify(t)} but focus is on ${JSON.stringify(w.testID??w.id??null)}. did the tap land on an outer Pressable wrapper?`),process.exit(1))),await u.send({type:"keyboard",action:"type",text:n});let g=m||we(f),S=g?Z:Ve(n,f),W=g&&f.focusedInput?{...f.focusedInput,secureTextEntry:!0,text:typeof f.focusedInput.text=="string"?Z:f.focusedInput.text}:f.focusedInput??null;await q("inspect type-into",{tapOn:{id:t},inputText:S},S===Z?`type-into #${t} ${Z}`:`type-into #${t} ${JSON.stringify(n)}`),console.log(JSON.stringify({target:t,isTextInput:i.isTextInput,secureTextEntry:g,keyboardOpened:f.visible??d?.keyboardOpened??!1,focusedInput:W,typed:S},null,2));break}case"type":{let t=l.slice(1).join(" ");t||(console.error(I("type","<text>")),process.exit(1));let n=await Pe(u,"type");await u.send({type:"keyboard",action:"type",text:t});let r=Ve(t,n);await q("inspect type",{inputText:r},r===Z?`type ${Z}`:`type ${JSON.stringify(t)}`),console.log(r===Z?` typed: ${Z}`:` typed: ${JSON.stringify(t)}`);break}case"key":{let t=l[1];t||(console.error(I("key","<name>")),process.exit(1)),await Pe(u,"key"),await u.send({type:"keyboard",action:"press",text:t}),await q("inspect key",{pressKey:t},`key ${t}`),console.log(` pressed: ${t}`);break}case"key-sequence":{let t=l.slice(1);t.length===0&&(console.error(I("key-sequence","<key> [<key> ...]")),process.exit(1)),await Pe(u,"key-sequence");for(let n of t)await u.send({type:"keyboard",action:"press",text:n});await q("inspect key-sequence",{pressKey:t.join(" ")},`key-sequence ${t.join(" ")}`),console.log(` pressed: ${t.join(", ")}`);break}case"keycode":{let t=l.slice(1);t.length===0&&(console.error(I("keycode","<code> [<code> ...]")),process.exit(1));let n=t.map(i=>({code:i,key:Ss(i)})),r=n.filter(i=>!i.key);r.length>0&&(console.error(` unsupported keycode(s): ${r.map(i=>i.code).join(", ")}`),process.exit(1)),await Pe(u,"keycode");for(let i of n)await u.send({type:"keyboard",action:"press",text:i.key});await q("inspect keycode",{pressKey:n.map(i=>i.key).join(" ")},`keycode ${t.join(" ")}`),console.log(` pressed: ${t.join(", ")}`);break}case"dispatch":{let t=l[1];t||(console.error(I("dispatch","<char>")),process.exit(1)),await u.send({type:"keyboard",action:"dispatchKey",text:t}),await q("inspect dispatch",{dispatchKey:t},`dispatch ${JSON.stringify(t)}`),console.log(` dispatched: ${t}`);break}case"dismiss":{await u.send({type:"keyboard",action:"dismiss"}),await q("inspect dismiss",{hideKeyboard:!0},"dismiss keyboard"),console.log(" keyboard dismissed");break}case"double-tap":{let t=Number(l[1]),n=Number(l[2]),r=xe(e);if(r){let f=await Oe(u,r);f||(console.error(` not found: ${r.value}`),r.mode==="testid"&&Q("wait-selector-for-missing-testid",r.value),process.exit(1)),t=f.x,n=f.y}let i=l[3]?Number(l[3]):80;(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(i))&&(console.error(I("double-tap","<x> <y> [gapMs] | --testid <id>")),process.exit(1));let d=Math.max(0,Math.round(i)),m=await u.send({type:"evaluate",code:`(async () => {
|
|
662
662
|
const interact = window.__sootsimInteract
|
|
663
663
|
if (interact?.doubleTap) {
|
|
664
664
|
return {
|
|
@@ -681,7 +681,7 @@ ${n}
|
|
|
681
681
|
first,
|
|
682
682
|
second,
|
|
683
683
|
}
|
|
684
|
-
})()`});m?.ok&&await q("inspect double-tap",{doubleTapAtCoords:{x:t,y:n,gapMs:d}},`double-tap @${t},${n}`),console.log(JSON.stringify(m,null,2));break}case"long-press":{let t=Number(l[1]),n=Number(l[2]),r=
|
|
684
|
+
})()`});m?.ok&&await q("inspect double-tap",{doubleTapAtCoords:{x:t,y:n,gapMs:d}},`double-tap @${t},${n}`),console.log(JSON.stringify(m,null,2));break}case"long-press":{let t=Number(l[1]),n=Number(l[2]),r=xe(e),i=null;if(r){let g=await Oe(u,r);g||(console.error(` not found: ${r.value}`),r.mode==="testid"&&Q("wait-selector-for-missing-testid",r.value),process.exit(1)),t=g.x,n=g.y,i={id:g.id??null,testID:g.testID??null,text:g.text??null,type:g.type??null}}let d=r?l[1]:l[3],m=d?Number(d):600;(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(m))&&(console.error(I("long-press","<x> <y> [durationMs] | --testid <id>")),process.exit(1));let f=Math.max(0,Math.round(m)),w=await u.send({type:"longPress",x:t,y:n,durationMs:f,target:i});w?.ok&&await q("inspect long-press",{tapAtCoords:{x:t,y:n}},`long-press @${t},${n}`),console.log(JSON.stringify(w,null,2));break}case"touch":{let t=l[1],n=Number(l[2]),r=Number(l[3]),i=l[4]?Number(l[4]):999,d=t==="down"?"touchDown":t==="move"?"touchMove":t==="up"?"touchUp":t==="cancel"?"touchCancel":null;d||(console.error(I("touch","<down|move|up|cancel> <x> <y> [pointerId]")),process.exit(1)),t!=="cancel"&&(!Number.isFinite(n)||!Number.isFinite(r))&&(console.error(I("touch","<down|move|up|cancel> <x> <y> [pointerId]")),process.exit(1));let m=t==="down"?"tap":t==="move"?"move":null,f=m&&Number.isFinite(n)&&Number.isFinite(r)?`window.dispatchEvent(new CustomEvent('sootsim:agentAction', { detail: { type: '${m}', x: ${n}, y: ${r} } }));`:"",w=await u.send({type:"evaluate",code:`(async () => {
|
|
685
685
|
${f}
|
|
686
686
|
const interact = window.__sootsimInteract
|
|
687
687
|
if (!interact?.${d}) return { ok: false, reason: 'no interact.${d}' }
|
|
@@ -695,12 +695,12 @@ ${n}
|
|
|
695
695
|
statusBarHeight: spec.statusBarHeight || 0,
|
|
696
696
|
homeIndicatorHeight: spec.homeIndicatorHeight || 0,
|
|
697
697
|
}
|
|
698
|
-
})()`}),d=Number(i?.width)||393,m=Number(i?.height)||852,f=Number(i?.statusBarHeight)||0,w=Number(i?.homeIndicatorHeight)||0,g=Math.round(d/2),S=Math.round(m/2),W=Math.max(24,f+18),
|
|
698
|
+
})()`}),d=Number(i?.width)||393,m=Number(i?.height)||852,f=Number(i?.statusBarHeight)||0,w=Number(i?.homeIndicatorHeight)||0,g=Math.round(d/2),S=Math.round(m/2),W=Math.max(24,f+18),V=Math.max(24,w+18),G=18,z=Math.min(220,Math.round(m*.24)),E=Math.min(180,Math.round(d*.32)),$=g,k=S,T=g,ne=S;switch(n){case"scroll-up":k=S+Math.round(z/2),ne=S-Math.round(z/2);break;case"scroll-down":k=S-Math.round(z/2),ne=S+Math.round(z/2);break;case"scroll-left":$=g+Math.round(E/2),T=g-Math.round(E/2);break;case"scroll-right":$=g-Math.round(E/2),T=g+Math.round(E/2);break;case"swipe-from-left-edge":$=G,k=S,T=Math.min(d-G,G+E);break;case"swipe-from-right-edge":$=d-G,k=S,T=Math.max(G,d-G-E);break;case"swipe-from-top-edge":$=g,k=W,ne=Math.min(m-V,W+z);break;case"swipe-from-bottom-edge":$=g,k=m-V,ne=Math.max(W,m-V-z);break}let Y=Math.max(8,Math.round(r/16)),B=Math.max(1,Math.round(r/Y)),ve=await u.send({type:"evaluate",code:`(async () => {
|
|
699
699
|
const interact = window.__sootsimInteract
|
|
700
700
|
if (!interact?.drag) return { ok: false, reason: 'no interact.drag' }
|
|
701
701
|
const value = await interact.drag(${$}, ${k}, ${T}, ${ne}, ${Y}, ${B})
|
|
702
702
|
return { ok: !!value, value }
|
|
703
|
-
})()`});
|
|
703
|
+
})()`});ve?.ok&&await q("inspect gesture",{swipe:{start:`${$}, ${k}`,end:`${T}, ${ne}`,duration:Math.max(1,Math.round(r))}},`gesture ${n}`),console.log(JSON.stringify({preset:n,from:{x:$,y:k},to:{x:T,y:ne},result:ve},null,2));break}case"scroll":{let t=xe(e),n=ks(e),r=t?.mode==="testid"?t.value:n==null?l[1]:null,i=t||n!=null?1:2,d=Number(l[i]),m=Number(l[i+1]);(!r&&n==null||!Number.isFinite(d)||!Number.isFinite(m))&&(console.error(I("scroll","<id> <x> <y> | --testid <id> <x> <y> | --node-id <nodeId> <x> <y>")),process.exit(1));let f=await u.send({type:"evaluate",code:`(async () => {
|
|
704
704
|
const t = window.__sootsimTest
|
|
705
705
|
if (!t) return null
|
|
706
706
|
const n = ${n!=null?`await t.inspectByNodeId(${JSON.stringify(n)})`:`await t.findByTestId(${JSON.stringify(r)})
|
|
@@ -710,7 +710,7 @@ ${n}
|
|
|
710
710
|
cx: n.absolutePosition.x + (n.layout.width || 0) / 2,
|
|
711
711
|
cy: n.absolutePosition.y + (n.layout.height || 0) / 2,
|
|
712
712
|
}
|
|
713
|
-
})()`}),w=await
|
|
713
|
+
})()`}),w=await X(u,"scrollTo",n!=null?{nodeId:n}:r,d,m,!1);if(w?.ok){let g=n!=null?`node ${n}`:`#${r}`;await q("inspect scroll",{scrollTo:{...n!=null?{nodeId:n}:{id:r},x:d,y:m}},`scroll ${g} -> ${d},${m}`)}console.log(JSON.stringify({...w,...f?{at:{x:f.cx,y:f.cy}}:{}},null,2));break}case"state":{let t=l[1];if(s==="get"&&!t){let r=await X(u,"getRuntimeState"),i=await u.send({type:"evaluate",code:_e});if(r&&typeof r=="object"&&r.diagnostics&&(r.diagnostics.errors=i?.errors??0,r.diagnostics.warnings=i?.warnings??0),r&&typeof r=="object"&&r.shell==null)try{let d=await ue(u);d&&(r.shell=d)}catch{}console.log(JSON.stringify(r,null,2));break}if(!t||t==="--help"||t==="-h"){console.log(`
|
|
714
714
|
${h("state")} \u2014 dump raw runtime state
|
|
715
715
|
|
|
716
716
|
subcommands:
|
|
@@ -718,6 +718,7 @@ ${n}
|
|
|
718
718
|
worker dump render-worker host/animation state
|
|
719
719
|
keyboard dump keyboard visibility, mode, and focused input
|
|
720
720
|
ownership dump surface ownership + pointerOnSurface delivery stats
|
|
721
|
+
worklets dump tenant + shell worklet-runtime slot/handler counts
|
|
721
722
|
node <id> dump raw node info by id or testID
|
|
722
723
|
scroll <id> dump scroll metrics and runtime state
|
|
723
724
|
scroll-hit <x> <y> dump the nearest scroll ancestor at coordinates
|
|
@@ -730,11 +731,12 @@ ${n}
|
|
|
730
731
|
${h("state")} worker
|
|
731
732
|
${h("state")} keyboard
|
|
732
733
|
${h("state")} ownership
|
|
734
|
+
${h("state")} worklets
|
|
733
735
|
${h("state")} node photos
|
|
734
736
|
${h("state")} scroll feed
|
|
735
737
|
${h("state")} scroll-hit 360 420
|
|
736
738
|
${h("state")} hit 200 720
|
|
737
|
-
`);break}let n;switch(t){case"shell":n=await ue(u,500);break;case"worker":n=await
|
|
739
|
+
`);break}let n;switch(t){case"shell":n=await ue(u,500);break;case"worker":n=await ge(u,"__sootsimRenderHost.queryStats");break;case"ownership":n=await u.send({type:"evaluate",code:`(() => {
|
|
738
740
|
const h = window.__sootsimRenderHost
|
|
739
741
|
if (!h || typeof h.getOwnershipSnapshot !== 'function') {
|
|
740
742
|
return { error: 'getOwnershipSnapshot not available' }
|
|
@@ -768,7 +770,7 @@ ${n}
|
|
|
768
770
|
text: secureTextEntry ? ${JSON.stringify(Z)} : (focused.text || null),
|
|
769
771
|
} : null,
|
|
770
772
|
}
|
|
771
|
-
})()`}),n=Qe(n);break;case"node":{let r=l[2];r||(console.error(` usage: ${h("state")} node <id>`),process.exit(1)),n=await
|
|
773
|
+
})()`}),n=Qe(n);break;case"node":{let r=l[2];r||(console.error(` usage: ${h("state")} node <id>`),process.exit(1)),n=await X(u,"findByTestId",r)||await X(u,"findById",r);break}case"scroll":{let r=l[2];r||(console.error(` usage: ${h("state")} scroll <id>`),process.exit(1)),n=await X(u,"getScrollState",r);break}case"scroll-hit":{let r=Number(l[2]),i=Number(l[3]);(!Number.isFinite(r)||!Number.isFinite(i))&&(console.error(` usage: ${h("state")} scroll-hit <x> <y>`),process.exit(1)),n=await X(u,"getScrollStateAt",r,i);break}case"hit":{let r=Number(l[2]),i=Number(l[3]);(!Number.isFinite(r)||!Number.isFinite(i))&&(console.error(` usage: ${h("state")} hit <x> <y>`),process.exit(1)),n=await X(u,"debugHitAt",r,i);break}case"gesture":{let r=Number(l[2]),i=Number(l[3]);(!Number.isFinite(r)||!Number.isFinite(i))&&(console.error(` usage: ${h("state")} gesture <x> <y>`),process.exit(1)),n=await X(u,"debugGestureAt",r,i);break}case"gesture-seam":n=await ge(u,"SootSim.bridges.mainShell.callTestBridge","getShellGestureSeamDebug");break;case"worklets":{let[r,i]=await Promise.all([X(u,"getWorkletSlotStats"),ge(u,"SootSim.bridges.mainShell.callTestBridge","getWorkletSlotStats")]);n={tenant:r,shell:i};break}default:console.error(` unknown state subcommand: ${t}`),process.exit(1)}console.log(JSON.stringify(n,null,2));break}case"shell":{let t=l[1];if(!t||t==="--help"||t==="-h"){console.log(`
|
|
772
774
|
${h("shell")} \u2014 run built-in shell commands
|
|
773
775
|
|
|
774
776
|
subcommands:
|
|
@@ -792,7 +794,7 @@ ${n}
|
|
|
792
794
|
${h("shell")} open-card clock 800
|
|
793
795
|
${h("shell")} appearance dark
|
|
794
796
|
${h("shell")} lock
|
|
795
|
-
`);break}let n=t==="launch"||t==="open-card"||t==="home"||t==="switcher",r=t==="launch"||t==="open-card"?l[3]:l[2],i=r?Number(r):350;n&&(!Number.isFinite(i)||i<0)&&(console.error(I("shell",t==="launch"||t==="open-card"?"<launch|open-card> <appId> [settleMs]":"<home|switcher> [settleMs]")),process.exit(1));let d=!1,m=!1,f=null,w=e.includes("--clear-state");if(t==="launch"){let g=l[2];g||(console.error(I("shell","launch <appId> [settleMs] [--clear-state]")),process.exit(1)),w&&await u.send({type:"evaluate",code:qe(!0)}),d=!!await
|
|
797
|
+
`);break}let n=t==="launch"||t==="open-card"||t==="home"||t==="switcher",r=t==="launch"||t==="open-card"?l[3]:l[2],i=r?Number(r):350;n&&(!Number.isFinite(i)||i<0)&&(console.error(I("shell",t==="launch"||t==="open-card"?"<launch|open-card> <appId> [settleMs]":"<home|switcher> [settleMs]")),process.exit(1));let d=!1,m=!1,f=null,w=e.includes("--clear-state");if(t==="launch"){let g=l[2];g||(console.error(I("shell","launch <appId> [settleMs] [--clear-state]")),process.exit(1)),w&&await u.send({type:"evaluate",code:qe(!0)}),d=!!await ye(u,"launchApp",i,g),{settled:m,state:f}=await Re(u,Math.round(i),S=>!!S&&S.state==="app"&&S.activeApp===g&&S.showSwitcher===!1&&S.switcherPhase==="idle"&&typeof S.launchProgress=="number"&&S.launchProgress>=.98),d&&await q("inspect shell launch",w?{launchApp:{clearState:!0}}:{launchApp:{}},w?"launch app (clear state)":"launch app")}else if(t==="home")d=!!await ye(u,"goHome",i),{settled:m,state:f}=await Re(u,Math.round(i),g=>!!g&&g.state==="home"&&g.activeApp==null&&g.showSwitcher===!1&&g.switcherPhase==="idle"&&typeof g.launchProgress=="number"&&g.launchProgress>=.98);else if(t==="switcher")d=!!await ye(u,"openSwitcher",i),{settled:m,state:f}=await Re(u,Math.round(i),g=>!!g&&g.state==="app"&&g.showSwitcher===!0&&g.switcherPhase==="idle"&&typeof g.zoomLevel=="number"&&Math.abs(g.zoomLevel)<=.02&&typeof g.horizontalZoom=="number"&&Math.abs(g.horizontalZoom)<=.02),m&&(await oe(ws),f=await ue(u));else if(t==="open-card"){let g=l[2];g||(console.error(I("shell","open-card <appId> [settleMs]")),process.exit(1)),d=!!await ye(u,"openSwitcherCard",i,g),{settled:m,state:f}=await Re(u,Math.round(i),S=>!!S&&S.state==="app"&&S.activeApp===g&&S.showSwitcher===!1&&S.switcherPhase==="idle"&&typeof S.zoomLevel=="number"&&S.zoomLevel>=.98&&typeof S.horizontalZoom=="number"&&S.horizontalZoom>=.98),d&&await q("inspect shell open-card",{openSwitcherCard:{appId:g}},`open switcher card ${g}`)}else if(t==="appearance"){let g=l[2];(!g||!["light","dark","auto","toggle"].includes(g))&&(console.error(I("shell","appearance <light|dark|auto|toggle>")),process.exit(1));let S=await So(u,"appearance",g);if(d=!!S?.ok,f={appearance:S},d){let W=S?.applied??g;console.log(` appearance: ${W}`)}}else if(t==="lock"||t==="shake"){let g=await So(u,t);d=!!g?.ok,f={[t]:g}}else console.error(` unknown shell subcommand: ${t}`),process.exit(1);console.log(JSON.stringify({ok:d,settled:m,state:f},null,2));break}case"url":{await ao(u,{args:a});break}case"reload":{let r=!1,i=!1;try{await u.send({type:"evaluate",code:"window.__sootsimConsole?.clear()"});let f=await u.send({type:"evaluate",code:`;(async () => {
|
|
796
798
|
// in-place guest reload is only valid while the page still runs
|
|
797
799
|
// the engine build the server would serve NOW. the shell dev
|
|
798
800
|
// server has no HMR client, so a long-lived sim tab otherwise
|
|
@@ -919,8 +921,8 @@ ${n}
|
|
|
919
921
|
})()`});if(d?.error&&(console.error(` error: ${d.error}`),process.exit(1)),A(a)){D(d);break}Ie(` ${n} transition profiled:`),$o(d);break}default:console.error(` unknown perf subcommand: ${t}`),console.error(" valid: start, stop, transition"),/^--?reset$/.test(t)&&console.error(" note: 'perf start' already clears prior frames \u2014 no reset needed"),(t==="stats"||t==="frames"||t==="worst")&&(console.error(" note: the tenant sampler (stats/frames/worst) was removed \u2014 it hardcoded"),console.error(" layout/render/copy to zero because the shell worker owns every real paint."),console.error(" use 'perf start' / 'perf stop' (worst frames are in the stop report).")),process.exit(1)}break}case"errors":{let t=l[1];if(t==="clear"){await Le(u),A(a)?D({cleared:!0}):console.log(" error buffer cleared");break}let n=t?Number(t):20,r=await fe(u,n);if(A(a)){D(r);break}if(r.length===0){console.log(" no errors captured");break}console.log(` ${r.length} error(s):
|
|
920
922
|
`);for(let i of r){let d=ie(i.timestamp),m=i.args.map(f=>typeof f=="object"?JSON.stringify(f):f).join(" ");if(console.log(` [${d}] ${m}`),i.stack){let f=i.stack.split(`
|
|
921
923
|
`).slice(0,3);for(let w of f)console.log(` ${w.trim()}`)}}break}case"warnings":{let t=l[1]?Number(l[1]):20,n=await gt(u,t);if(A(a)){D(n);break}if(n.length===0){console.log(" no warnings captured");break}console.log(` ${n.length} warning(s):
|
|
922
|
-
`);for(let r of n){let i=ie(r.timestamp),d=r.args.map(m=>typeof m=="object"?JSON.stringify(m):m).join(" ");console.log(` [${i}] ${d}`)}break}case"animations":{let t=await
|
|
923
|
-
`);for(let n of t){let r=String(n.kind).padEnd(6),i=`${Number(n.from).toFixed(2)}\u2192${Number(n.to).toFixed(2)}`,d=Number(n.current??0).toFixed(2),m=`${Math.round((n.progress??0)*100)}%`,f=`${Math.round(n.elapsedMs??0)}ms`,w=n.loop?" loop":"",g=n.layoutBound?" layout":"";console.log(` #${n.id} ${r} ${i.padEnd(14)} cur=${d.padEnd(7)} ${m.padStart(4)} ${f}${w}${g}`)}break}case"animation":{let t=l[1];(!t||t==="--help"||t==="-h")&&(console.error(` usage: ${h("animation")} <id>`),process.exit(1));let n=Number(t);Number.isFinite(n)||(console.error(` invalid id: ${t}`),process.exit(1));let r=await
|
|
924
|
+
`);for(let r of n){let i=ie(r.timestamp),d=r.args.map(m=>typeof m=="object"?JSON.stringify(m):m).join(" ");console.log(` [${i}] ${d}`)}break}case"animations":{let t=await X(u,"listAnimations")??[];if(e.includes("--json")){console.log(JSON.stringify(t,null,2));break}if(t.length===0){console.log(" no active animations");break}console.log(` ${t.length} active animation(s):
|
|
925
|
+
`);for(let n of t){let r=String(n.kind).padEnd(6),i=`${Number(n.from).toFixed(2)}\u2192${Number(n.to).toFixed(2)}`,d=Number(n.current??0).toFixed(2),m=`${Math.round((n.progress??0)*100)}%`,f=`${Math.round(n.elapsedMs??0)}ms`,w=n.loop?" loop":"",g=n.layoutBound?" layout":"";console.log(` #${n.id} ${r} ${i.padEnd(14)} cur=${d.padEnd(7)} ${m.padStart(4)} ${f}${w}${g}`)}break}case"animation":{let t=l[1];(!t||t==="--help"||t==="-h")&&(console.error(` usage: ${h("animation")} <id>`),process.exit(1));let n=Number(t);Number.isFinite(n)||(console.error(` invalid id: ${t}`),process.exit(1));let r=await X(u,"getAnimation",n);console.log(JSON.stringify(r,null,2));break}case"stop-animation":{let t=l[1];(!t||t==="--help"||t==="-h")&&(console.error(` usage: ${h("stop-animation")} <id|all>`),process.exit(1));let n=t==="all"?"all":Number(t);n!=="all"&&!Number.isFinite(n)&&(console.error(` invalid id: ${t}`),process.exit(1));let r=await X(u,"stopAnimation",n);console.log(` stopped ${r??0} animation(s)`);break}case"requests":{let t=l[1];if(t==="clear"){await ht(u),A(a)?D({cleared:!0}):console.log(" request buffer cleared");break}let n=t==="all",r=n?l[2]:t,i=r?Number(r):20,d=await yt(u,{failed:!n,limit:i});if(A(a)){D(d);break}if(d.length===0){console.log(n?" no requests captured":" no failed requests captured");break}console.log(` ${d.length} ${n?"request(s)":"failed request(s)"}:
|
|
924
926
|
`);for(let m of d){let f=ie(m.timestamp);console.log(` [${f}] ${U(m)}`),m.responseBody?console.log(` ${m.responseBody}`):m.error&&console.log(` ${m.error}`)}break}case"network":{let t=l[1],n=null,r=null,i=!1,d=!1,m=1e3,f=!1,w=!1;for(let E=0;E<a.length;E++){let $=a[E];if($==="--filter")n=a[E+1]??null,E++;else if($==="--limit"){let k=Number(a[E+1]);Number.isFinite(k)&&(r=k),E++}else if($==="--threshold"){let k=Number(a[E+1]);Number.isFinite(k)&&k>0&&(m=k),E++}else $==="--failed"?i=!0:$==="--slow"?d=!0:$==="--tail"||$==="-f"?f=!0:$==="--json"&&(w=!0)}if(t==="clear"){await u.send({type:"evaluate",code:'window.__sootsimObservability?.network.clear(); "cleared"'}),console.log(" network buffer cleared");break}if(t==="get"){let E=l[2];E||(console.error(" usage: sootsim network get <id>"),process.exit(1));let $=await u.send({type:"evaluate",code:`(() => {
|
|
925
927
|
const obs = window.__sootsimObservability;
|
|
926
928
|
if (!obs) return null;
|
|
@@ -933,10 +935,10 @@ ${n}
|
|
|
933
935
|
})()`});if(!E||!E.ok)throw new Error("observability bridge not installed \u2014 is the engine running?");return E.entries??[]},W=E=>{let $=E;if(i&&($=$.filter(k=>!!k.error||k.status!=null&&k.status>=400)),d&&($=$.filter(k=>k.durationMs!=null&&k.durationMs>=m)),n){let k=n.toLowerCase();$=$.filter(T=>(T.displayUrl||T.url).toLowerCase().includes(k))}return d&&!f&&($=[...$].sort((k,T)=>(T.durationMs??0)-(k.durationMs??0))),$};if(!f){let E=await S(),$=W(E).slice(-g);if(w){console.log(JSON.stringify($,null,2));break}if($.length===0){E.length===0?console.log(" no network requests captured"):console.log(d?` no requests slower than ${m}ms (${E.length} total \u2014 try --threshold <ms>)`:" no matching requests");break}console.log(d?` ${$.length} request(s) slower than ${m}ms (sorted by duration desc):
|
|
934
936
|
`:` ${$.length} request(s):
|
|
935
937
|
`);for(let k of $)ho(k);break}console.log(` tailing network (ctrl-c to stop)...
|
|
936
|
-
`);let
|
|
937
|
-
to target a specific sim, use \`--sim ${t}\` instead.`),process.exit(1));let W=()=>bt(u),
|
|
938
|
+
`);let V=new Set,G=!0,z=()=>{G=!1};process.on("SIGINT",z);try{for(;G;){let E=await S(),$=W(E);for(let k of $)k.durationMs!=null&&(V.has(k.id)||(V.add(k.id),w?console.log(JSON.stringify(k)):ho(k)));await oe(250)}}finally{process.off("SIGINT",z)}break}case"logs":{let t=l[1],n=null,r=null,i=null,d=!1,m=!1,f=!1;for(let $=0;$<a.length;$++){let k=a[$];if(k==="--filter")n=a[$+1]??null,$++;else if(k==="--limit"){let T=Number(a[$+1]);Number.isFinite(T)&&(r=T),$++}else k==="--level"?(i=a[$+1]??null,$++):k==="--tail"||k==="-f"?d=!0:k==="--json"?m=!0:(k==="--internal"||k==="--all")&&(f=!0)}let w=i?new Set(i.split(",").map($=>$.trim()).filter($=>$==="log"||$==="info"||$==="warn"||$==="error"||$==="debug")):null;if(t==="clear"){await wt(u),console.log(" log buffer cleared");break}let g=!m&&process.stdout.isTTY===!0,S=r??(d?500:t?Number(t):50);Number.isFinite(S)||(console.error(` invalid limit: ${t} \u2014 \`logs\` takes a numeric count (e.g. ${h("logs")} 100).
|
|
939
|
+
to target a specific sim, use \`--sim ${t}\` instead.`),process.exit(1));let W=()=>bt(u),V=$=>xt($,{level:w,filter:n,showInternal:f});if(!d){let $=await W(),k=V($).slice(-S);if(m){console.log(JSON.stringify(k,null,2));break}if(k.length===0){console.log($.length===0?" no logs captured":" no matching logs");break}console.log(` ${k.length} log(s):
|
|
938
940
|
`);for(let T of k)wo(T,g);break}console.log(` tailing logs (ctrl-c to stop)...
|
|
939
|
-
`);let G=new Set,z=!0,E=()=>{z=!1};process.on("SIGINT",E);try{for(;z;){let $=await W(),k=
|
|
941
|
+
`);let G=new Set,z=!0,E=()=>{z=!1};process.on("SIGINT",E);try{for(;z;){let $=await W(),k=V($);for(let T of k)G.has(T.id)||(G.add(T.id),m?console.log(JSON.stringify(T)):wo(T,g));await oe(250)}}finally{process.off("SIGINT",E)}break}default:console.error(` unknown subcommand: ${p}`),process.exit(1)}if(C.has(p)&&!e.includes("--no-wait")&&process.env.SOOTSIM_NO_AUTO_WAIT!=="1"&&!await nt(u,p)&&await v(u),x.length>0&&ee(x),!P.has(p)&&!A(a))try{await $e(u)}catch{}}catch(x){let t=x instanceof Error?x.message:String(x);console.error(` ${p??"inspect"} failed: ${t}`);let n=/^no sim connected with id (.+)$/.exec(t),r=/^command timed out after (\d+)s$/.exec(t),i=t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("could not connect to ws://");if(n)await Rt(u,M,n[1]);else if(/^no sim connected$/.test(t))Et(M);else if(r)if(await ds(u)){let m=p??"describe";process.stderr.write(` the sim is still responsive \u2014 '${m}' just exceeded the ${r[1]}s command budget.
|
|
940
942
|
the screen's node tree is large; narrow the query or raise the budget:
|
|
941
943
|
sootsim ${m} --testid <id> # scope to one subtree
|
|
942
944
|
sootsim find --testid <id> # targeted single-node lookup
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as k,i as x,l as P,m as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as k,i as x,l as P,m as v}from"./chunk-BGW73A3C.js";import{createHash as q}from"node:crypto";import{mkdirSync as G,readFileSync as J,readdirSync as H,unlinkSync as Y,writeFileSync as z}from"node:fs";import{dirname as Q,extname as X,resolve as T}from"node:path";function W(e){let t=e[0]?.toLowerCase()??"toggle";return t!=="on"&&t!=="off"&&t!=="toggle"&&(console.error(` unknown argument: "${t}" (expected on | off | toggle)`),process.exit(1)),t}async function D(e,t,o){let n=k(e,{port:t.port}),r=W(n.positional),d=x({...n,commandTimeoutMs:5e3});try{let l=!!(await P(d,"SootSim.bridges.settings.get"))?.[o.modeKey],m=r==="on"?!0:r==="off"?!1:!l;if(l===m)return console.log(` ${o.displayName}: already ${m?"on":"off"}`),{current:l,target:m,changed:!1};if(!await d.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(o.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(m)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.236 | (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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{e as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as p}from"./chunk-PEFAS7Q4.js";import{a as c,b as l}from"./chunk-DKGKL6KP.js";import{a}from"./chunk-Q2X3WO5X.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
|
|
3
3
|
sootsim ${e} needs auth before it can check recording access.
|
|
4
4
|
|
|
5
5
|
pick one:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as f}from"./chunk-ORSIJ76W.js";import{existsSync as g,mkdirSync as h,readFileSync as S,writeFileSync as b,rmSync as x}from"fs";import{tmpdir as y}from"os";import{dirname as v,join as m}from"path";var p=new Map;function s(e,t){p.set(e,t)}var i=1;function a(){return m(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return m(y(),"sootsim-cli-hints-global.json")}function u(e){if(!g(e))return{version:i,shown:{}};try{let t=JSON.parse(S(e,"utf8"));return t?.version!==i||!t?.shown?{version:i,shown:{}}:t}catch{return{version:i,shown:{}}}}function l(e,t){try{h(v(e),{recursive:!0}),b(e,JSON.stringify(t)+`
|
|
3
3
|
`)}catch{}}function H(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function F(e,t){let o=H();if(o==="off")return!1;if(o==="always"||t==="always")return!0;let n=Date.now();if(t==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=n,l(a(),r),!0)}if(t==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=n,l(d(),r),!0)}if(typeof t=="object"&&"cooldownMs"in t){let r=u(a()),c=r.shown[e]??0;return n-c<t.cooldownMs?!1:(r.shown[e]=n,l(a(),r),!0)}return!0}function $(e,...t){let o=p.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!F(e,o.frequency))return!1;let n=o.render(...t);if(n==null)return!1;let r=Array.isArray(n)?n:[n],c=o.stream==="error"?console.error:console.log;for(let w of r)c(` hint: ${w}`);return!0}s("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});s("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});s("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(t=>` ${t}`)]:null,stream:"error"});s("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});s("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `sootsim describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});s("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});s("clean-uninstall",{frequency:"once-ever",render:()=>["to uninstall sootsim completely, run `sootsim daemon uninstall`.","it removes the launchd / systemd agent and the ~/.sootsim cache (~80MB)."]});export{$ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-FK57ISRW.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim compat \u2014 check package compatibility
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -20,7 +20,7 @@ examples:
|
|
|
20
20
|
sootsim compat react-native-reanimated
|
|
21
21
|
sootsim compat --json
|
|
22
22
|
sootsim compat --brief
|
|
23
|
-
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-
|
|
23
|
+
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-Y2HUWQL6.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-Y2HUWQL6.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
|
|
24
24
|
sootsim compatibility report
|
|
25
25
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as i,C as s,x as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as i,C as s,x as t}from"./chunk-KWNVZ2LX.js";import"./chunk-FK57ISRW.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
|
|
3
3
|
sootsim config \u2014 manage local CLI preferences
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-TB7CIKZ3.js";import"./chunk-BA4Q3KRH.js";import"./chunk-ZYEIV7ZN.js";import"./chunk-RGDT3EBF.js";import"./chunk-GB3IT6AN.js";import"./chunk-APQFVJDK.js";import"./chunk-UGRYC3HL.js";import"./chunk-4Z3JQFES.js";import"./chunk-3PLNSSEF.js";import"./chunk-IQ2IFKZ4.js";import"./chunk-PGLRJ4GA.js";import"./chunk-BGW73A3C.js";import"./chunk-G3MVPZBK.js";import"./chunk-G3EZ5KVE.js";import"./chunk-ORSIJ76W.js";import"./chunk-KWNVZ2LX.js";import"./chunk-54UQB2TW.js";import"./chunk-BDL6UO36.js";import"./chunk-FK57ISRW.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.236 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-5E24H5Z5.js";import"./chunk-PUH4S4CC.js";import"./chunk-Q2X3WO5X.js";import"./chunk-7KGIZCO3.js";import"./chunk-RBDWTH6O.js";import"./chunk-W7H4OAY4.js";import"./chunk-G3MVPZBK.js";import"./chunk-G3EZ5KVE.js";import"./chunk-ORSIJ76W.js";import"./chunk-LBXFCH5I.js";import"./chunk-KWNVZ2LX.js";import"./chunk-VQKTMX3M.js";import"./chunk-HBQ7CCHG.js";import"./chunk-BDL6UO36.js";import"./chunk-FK57ISRW.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
|