sootsim 0.1.119 → 0.1.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-HMYFFW3K.js → agent-JAQ76LFW.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-L5TRN5OW.js → agent-wrapper-UFBNAQR3.js} +2 -2
- package/dist-cli/chunks/{app-fonts-G5L5BPHX.js → app-fonts-66WNE562.js} +2 -2
- package/dist-cli/chunks/{assert-MN4TCTKK.js → assert-RXN5UUG3.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-WOBYOIE3.js +2 -0
- package/dist-cli/chunks/beta-TRSZJRLI.js +2 -0
- package/dist-cli/chunks/{chunk-CHHBZJBH.js → chunk-25PXT5BN.js} +1 -1
- package/dist-cli/chunks/{chunk-ZX4FJNIW.js → chunk-3OXUZ4YW.js} +1 -1
- package/dist-cli/chunks/{chunk-C3VO2MSV.js → chunk-3RTBGCJF.js} +2 -2
- package/dist-cli/chunks/{chunk-OS62SSOF.js → chunk-4XZ4WY4A.js} +2 -2
- package/dist-cli/chunks/{chunk-3MWC6EE2.js → chunk-527SSINQ.js} +2 -2
- package/dist-cli/chunks/{chunk-FUUXRMXG.js → chunk-52IG45RY.js} +2 -2
- package/dist-cli/chunks/{chunk-JP3PNWTD.js → chunk-663EI6DT.js} +1 -1
- package/dist-cli/chunks/{chunk-BBLE5DMP.js → chunk-6ECCKNU4.js} +1 -1
- package/dist-cli/chunks/{chunk-GEPWAAGG.js → chunk-7IJSQITG.js} +2 -2
- package/dist-cli/chunks/{chunk-4EQ5V4CA.js → chunk-7NLXLHEX.js} +1 -1
- package/dist-cli/chunks/{chunk-FCRJNHIA.js → chunk-BJH7O6J6.js} +1 -1
- package/dist-cli/chunks/{chunk-5OZHLK4L.js → chunk-BPSFMOFQ.js} +2 -2
- package/dist-cli/chunks/{chunk-TUJWNKG4.js → chunk-D4S3A7VQ.js} +1 -1
- package/dist-cli/chunks/{chunk-J6UPVQ37.js → chunk-DLVWPEI4.js} +2 -2
- package/dist-cli/chunks/{chunk-XYT2OO4N.js → chunk-E6MZZ2JK.js} +1 -1
- package/dist-cli/chunks/{chunk-O7SJH4E7.js → chunk-FPRRNX2V.js} +2 -2
- package/dist-cli/chunks/{chunk-AUKEEPZT.js → chunk-IGCYRC3B.js} +1 -1
- package/dist-cli/chunks/{chunk-H4F45EGT.js → chunk-IGRECENR.js} +1 -1
- package/dist-cli/chunks/{chunk-TGLPBQ4D.js → chunk-JHOXMDAW.js} +2 -2
- package/dist-cli/chunks/{chunk-LB7BYFMF.js → chunk-KPNFYPCM.js} +2 -2
- package/dist-cli/chunks/{chunk-AV6YDPVF.js → chunk-LK74SKOV.js} +2 -2
- package/dist-cli/chunks/{chunk-47SB3JEW.js → chunk-LRAMRKPE.js} +3 -3
- package/dist-cli/chunks/{chunk-SSQWBV2F.js → chunk-MB5HWJMY.js} +2 -2
- package/dist-cli/chunks/chunk-NUEWNRWO.js +1 -0
- package/dist-cli/chunks/{chunk-475TNRB7.js → chunk-O2M2AP7H.js} +2 -2
- package/dist-cli/chunks/{chunk-O552XDE7.js → chunk-O2ZEDQRY.js} +2 -2
- package/dist-cli/chunks/chunk-O7HUOQQ7.js +2 -0
- package/dist-cli/chunks/{chunk-MNILEOSP.js → chunk-OJQCMP4V.js} +1 -1
- package/dist-cli/chunks/{chunk-JFHETXYV.js → chunk-P3YMHC64.js} +1 -1
- package/dist-cli/chunks/{chunk-MJQXUHDS.js → chunk-PIMLP3CT.js} +2 -2
- package/dist-cli/chunks/{chunk-RF2STDGD.js → chunk-PISK5DP6.js} +2 -2
- package/dist-cli/chunks/chunk-PXMMDJOI.js +1 -0
- package/dist-cli/chunks/{chunk-EIAYJLBW.js → chunk-QL5FA4KK.js} +2 -2
- package/dist-cli/chunks/{chunk-DE6JMHEW.js → chunk-RKJS56NM.js} +2 -2
- package/dist-cli/chunks/{chunk-APWX6YCC.js → chunk-S5UDIVJX.js} +2 -2
- package/dist-cli/chunks/{chunk-QMU4MAG3.js → chunk-SLLX3SWM.js} +1 -1
- package/dist-cli/chunks/{chunk-BZH7FKZZ.js → chunk-SPM7MIOO.js} +22 -12
- package/dist-cli/chunks/{chunk-4KU7AIP7.js → chunk-SPNQRDT7.js} +1 -1
- package/dist-cli/chunks/{chunk-YZ6MQTDJ.js → chunk-UMR6DJZG.js} +2 -2
- package/dist-cli/chunks/{chunk-RAWQNHKI.js → chunk-V2UHENRM.js} +1 -1
- package/dist-cli/chunks/chunk-VCJ6CAP5.js +1 -0
- package/dist-cli/chunks/{chunk-HPTOFA3Y.js → chunk-WTPKU4YG.js} +3 -3
- package/dist-cli/chunks/{chunk-WNK5XRWG.js → chunk-WWFXKF3K.js} +2 -2
- package/dist-cli/chunks/{chunk-YBRJSW5C.js → chunk-ZYR5O6UT.js} +3 -3
- package/dist-cli/chunks/cli-version-IDCZT6SQ.js +2 -0
- package/dist-cli/chunks/{compat-3C3O2TKY.js → compat-6HRSZHAI.js} +3 -3
- package/dist-cli/chunks/{config-TEO7DXWJ.js → config-AAHNHDGM.js} +2 -2
- package/dist-cli/chunks/control-2AGQ4GUN.js +2 -0
- package/dist-cli/chunks/{cpu-profile-QSFGY7HA.js → cpu-profile-RBTXSQVS.js} +2 -2
- package/dist-cli/chunks/{daemon-R2TQX4HR.js → daemon-ZDL4HAJ6.js} +2 -2
- package/dist-cli/chunks/{debug-UMLASBX2.js → debug-GPCQOMPB.js} +3 -3
- package/dist-cli/chunks/{detox-Y6TFEKQU.js → detox-ZMUVIM6C.js} +2 -2
- package/dist-cli/chunks/{device-4NBQC4LP.js → device-7U2WD3LH.js} +2 -2
- package/dist-cli/chunks/{diagnose-DKXPE4P6.js → diagnose-AHAABGO2.js} +2 -2
- package/dist-cli/chunks/drivers-RKCUWIKI.js +2 -0
- package/dist-cli/chunks/{electron-3AZTVV3N.js → electron-5MXNHIMP.js} +3 -3
- package/dist-cli/chunks/flow-NOT2JPAQ.js +2 -0
- package/dist-cli/chunks/help-HBLSAWHF.js +2 -0
- package/dist-cli/chunks/{hints-K323Q4NQ.js → hints-6E337RVS.js} +2 -2
- package/dist-cli/chunks/{home-paths-H7GUBJAB.js → home-paths-CZ67HGJ7.js} +2 -2
- package/dist-cli/chunks/{inspect-UJFYMPE5.js → inspect-OFQEFD7A.js} +3 -3
- package/dist-cli/chunks/install-33SLF767.js +2 -0
- package/dist-cli/chunks/{install-desktop-NT5QJIPD.js → install-desktop-AGDDOM5C.js} +3 -3
- package/dist-cli/chunks/{keys-OJVAQQK5.js → keys-ILCZHN7X.js} +2 -2
- package/dist-cli/chunks/{launch-VMMQENF6.js → launch-4BT4CF5H.js} +3 -3
- package/dist-cli/chunks/{login-CRJE2OZK.js → login-EBW5MZ7B.js} +4 -4
- package/dist-cli/chunks/{logout-3DXVRPLM.js → logout-FACVEAU4.js} +2 -2
- package/dist-cli/chunks/{maestro-FPDCZ3NO.js → maestro-T5OJV4WN.js} +2 -2
- package/dist-cli/chunks/{preview-7WLF767D.js → preview-OGUTDHGA.js} +2 -2
- package/dist-cli/chunks/{profile-DE5LJZ5Y.js → profile-OM32C3WD.js} +2 -2
- package/dist-cli/chunks/{react-HLRPZFFH.js → react-BT3Q3HEE.js} +2 -2
- package/dist-cli/chunks/{record-VQAG2YYZ.js → record-SDAASQC5.js} +2 -2
- package/dist-cli/chunks/runtime-23HEVNFL.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-O2WD2RT6.js → runtime-delivery-2ET2INWI.js} +2 -2
- package/dist-cli/chunks/{screenshot-HYSJVWYN.js → screenshot-GDNEA6ET.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-ME7WKY7S.js → screenshot-mode-GX3PSJUV.js} +2 -2
- package/dist-cli/chunks/{screenshots-5MY3SHOW.js → screenshots-BHHQP5D4.js} +2 -2
- package/dist-cli/chunks/{server-LRSX4VKM.js → server-SISUV3YX.js} +2 -2
- package/dist-cli/chunks/setup-repo-NU5MACBJ.js +2 -0
- package/dist-cli/chunks/{skills-SHJHDYYU.js → skills-2F6XJMFM.js} +2 -2
- package/dist-cli/chunks/{start-FBIHKRWV.js → start-AVNDR55O.js} +4 -4
- package/dist-cli/chunks/store-IQBPTP5Z.js +2 -0
- package/dist-cli/chunks/telemetry-4ASKMD4D.js +2 -0
- package/dist-cli/chunks/{test-W5VLOO6C.js → test-X2EOPVCG.js} +3 -3
- package/dist-cli/chunks/{three-mode-OILRSRAU.js → three-mode-HOAKG3OJ.js} +2 -2
- package/dist-cli/chunks/{timeline-H4SFNSBA.js → timeline-U5LB2UAV.js} +2 -2
- package/dist-cli/chunks/{upgrade-4SYAHMAP.js → upgrade-JKGP376V.js} +2 -2
- package/dist-cli/chunks/upload-MSXXFBQA.js +2 -0
- package/dist-cli/chunks/{web-UXTXQNYW.js → web-XC36Y7B2.js} +2 -2
- package/dist-cli/chunks/{what-happened-SNC6DEIJ.js → what-happened-F7KIUJLJ.js} +2 -2
- package/dist-cli/chunks/{whoami-QDFN5LHP.js → whoami-MA2TQQQL.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/demo-app-registry.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +12 -2
- package/dist-lib/sdk.mjs +12 -2
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-QJ5PP7KT.js +0 -2
- package/dist-cli/chunks/beta-LAPRQ3TP.js +0 -2
- package/dist-cli/chunks/chunk-5AL4WWUG.js +0 -1
- package/dist-cli/chunks/chunk-IKVDJYRI.js +0 -2
- package/dist-cli/chunks/chunk-RIMNMM3O.js +0 -1
- package/dist-cli/chunks/chunk-YPLXVVG4.js +0 -1
- package/dist-cli/chunks/cli-version-JKOW3OL3.js +0 -2
- package/dist-cli/chunks/control-UUSQA7VO.js +0 -2
- package/dist-cli/chunks/drivers-TFUZRRDZ.js +0 -2
- package/dist-cli/chunks/flow-744L27RP.js +0 -2
- package/dist-cli/chunks/help-JUP3UEFR.js +0 -2
- package/dist-cli/chunks/install-D5J5LA2V.js +0 -2
- package/dist-cli/chunks/runtime-LBAJOT4M.js +0 -2
- package/dist-cli/chunks/setup-repo-5FHT7B6J.js +0 -2
- package/dist-cli/chunks/store-ZSAUNVP6.js +0 -2
- package/dist-cli/chunks/telemetry-E2ZAX2C6.js +0 -2
- package/dist-cli/chunks/upload-NPGWC7E5.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P,b as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as v}from"./chunk-6ECCKNU4.js";import{d as j}from"./chunk-WTPKU4YG.js";import{a as b}from"./chunk-RKJS56NM.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
|
|
3
3
|
`).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim setup-repo \u2014 set up sootsim in your project
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-LK74SKOV.js";import{w as o}from"./chunk-3OXUZ4YW.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-LK74SKOV.js";import{l as o}from"./chunk-3OXUZ4YW.js";import{chmodSync as p,existsSync as d,mkdirSync as g,readFileSync as I,rmSync as f,writeFileSync as _}from"node:fs";import{dirname as y,join as h,resolve as k}from"node:path";function i(){return h(o(),"credentials.json")}function S(){let n=i();if(!d(n))return null;try{let t=JSON.parse(I(n,"utf8"));return t.version!==1||typeof t.apiKey!="string"||!t.apiKey.startsWith("sk_sootsim_")?null:t.apiKey}catch{return null}}function w(n){if(!n.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let t=i();g(y(k(t)),{recursive:!0}),_(t,JSON.stringify({version:1,apiKey:n,savedAt:new Date().toISOString()},null,2)+`
|
|
3
3
|
`);try{p(t,384)}catch{}}function E(){f(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function O(n){return!!(n&&n.length>=20&&m.some(t=>n.startsWith(t)))}function A(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),r=n||t;if(!O(r))return null;let e=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!e)return null;let[l,u]=e.includes("/")?e.split("/",2):[null,null],c=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),a=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:e,repositoryId:c||null,owner:l||null,repo:u||null,installationId:a||null,source:n?"soot-runner":"github-actions"}}function x(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=A();if(t)return t;let r=S();if(r)return{kind:"api-key",secret:r,source:"file"};let e=s();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function H(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function N(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{S as a,w as b,E as c,x as d,H as e,N as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t=4001,n="sootsim close";export{t as a,n as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
function
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
function A(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n){let s=e.indexOf(r);if(s>=0&&e[s+1]){let o=Number(e[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return t}var f=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function m(e){return typeof e=="string"&&f.has(e)}async function h(e){return await e.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function L(e,t){if(!m(t))return!1;try{return await h(e)}catch{return!1}}async function D(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function N(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function H(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function $(e,t){let n=`(async () => {
|
|
3
3
|
const t = window.__sootsimTest
|
|
4
4
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
5
5
|
const kb = window.__sootsimKeyboard
|
|
@@ -14,7 +14,7 @@ function E(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n
|
|
|
14
14
|
const nodeCount = (await t.getNodeCount?.()) || 0
|
|
15
15
|
const keyboard = kb && typeof kb.getLayout === 'function' ? kb.getLayout() : null
|
|
16
16
|
return { tree, shell, nodeCount, keyboard }
|
|
17
|
-
})()`;return await e.send({type:"evaluate",code:n})??{}}var
|
|
17
|
+
})()`;return await e.send({type:"evaluate",code:n})??{}}var w=`(async () => {
|
|
18
18
|
const t = window.__sootsimTest
|
|
19
19
|
if (!t || typeof t.listInspectable !== 'function') return []
|
|
20
20
|
const list = await t.listInspectable({})
|
|
@@ -74,8 +74,8 @@ function E(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n
|
|
|
74
74
|
fontSize: fontSizeOf(style),
|
|
75
75
|
}
|
|
76
76
|
})
|
|
77
|
-
})()`;async function B(e){let t=await e.send({type:"evaluate",code:
|
|
78
|
-
`)}var
|
|
77
|
+
})()`;async function B(e){let t=await e.send({type:"evaluate",code:w});return Array.isArray(t)?t:[]}function M(e){return e.length===0?" no visible elements found":e.map(n=>{let s=[n.testID?`#${n.testID}`:n.selector?n.selector:n.role?`[${n.role}]`:`<${n.type}>`,`@(${n.box.x},${n.box.y})`,`${n.box.w}x${n.box.h}`];n.borderRadius>0&&s.push(`radius:${n.borderRadius}`);let o=n.padding;if(o.t||o.r||o.b||o.l){let i=o.t===o.r&&o.r===o.b&&o.b===o.l;s.push(i?`pad:${o.t}`:`pad:${o.t},${o.r},${o.b},${o.l}`)}if(n.fontSize>0&&s.push(`font:${n.fontSize}`),n.text){let i=n.text.length>40?`${n.text.slice(0,39)}\u2026`:n.text;s.push(`"${i}"`)}return` ${s.join(" ")}`}).join(`
|
|
78
|
+
`)}var x=`(async () => {
|
|
79
79
|
const t = window.__sootsimTest
|
|
80
80
|
if (!t) return []
|
|
81
81
|
|
|
@@ -148,7 +148,7 @@ function E(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n
|
|
|
148
148
|
return all
|
|
149
149
|
.filter(n => isVisibleTarget(n) && hasAccessibleSignal(n))
|
|
150
150
|
.map(normalize)
|
|
151
|
-
})()`;async function C(e){let t=await e.send({type:"evaluate",code:
|
|
151
|
+
})()`;async function C(e){let t=await e.send({type:"evaluate",code:x});return Array.isArray(t)?t:[]}var y=`
|
|
152
152
|
const fromInspectable = async () => {
|
|
153
153
|
if (typeof t.listInspectable !== 'function') return null
|
|
154
154
|
const list = await t.listInspectable({})
|
|
@@ -354,7 +354,7 @@ ${y}
|
|
|
354
354
|
externalStatus,
|
|
355
355
|
externalError,
|
|
356
356
|
}
|
|
357
|
-
})()`,I=100,T=750,_=2e3;function R(e){return e.targets>0||e.nodes>=I}function z(e){return e.externalError?`guest app errored: ${e.externalError}`:e.loadingText?`still showing "${e.loadingText}"`:e.externalReady===!1?"guest app is still loading":e.flag!==!0?"guest app has not emitted sootsim:externalAppReady":e.targets<=0?"ready flag emitted but no visible app content is inspectable yet":"node tree is still changing"}async function K(e,t=2e4,n={}){let r=Date.now(),s=r+t,o=n.progressIntervalMs??_,
|
|
357
|
+
})()`,I=100,T=750,_=2e3;function R(e){return e.targets>0||e.nodes>=I}function z(e){return e.externalError?`guest app errored: ${e.externalError}`:e.loadingText?`still showing "${e.loadingText}"`:e.externalReady===!1?"guest app is still loading":e.flag!==!0?"guest app has not emitted sootsim:externalAppReady":e.targets<=0?"ready flag emitted but no visible app content is inspectable yet":"node tree is still changing"}async function K(e,t=2e4,n={}){let r=Date.now(),s=r+t,o=n.progressIntervalMs??_,i=r+o,u=-1,c=r,a={flag:void 0,at:0,nodes:0,targets:0,errors:0,loadingText:"",externalReady:null,externalStatus:"",externalError:""};for(;Date.now()<s;){try{a=await e.send({type:"evaluate",code:v})??a}catch{}let l=Date.now(),d={ready:!1,elapsedMs:l-r,nodes:a.nodes,targets:a.targets,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,errors:a.errors};if(a.nodes!==u&&(u=a.nodes,c=l),a.flag===!0&&a.externalReady!==!1&&!a.externalError&&!a.loadingText&&R(a)&&l-c>=T)return{...d,ready:!0};if(n.onProgress&&o>0&&l>=i){n.onProgress(d);do i+=o;while(l>=i)}await new Promise(g=>setTimeout(g,150))}return{ready:!1,elapsedMs:Date.now()-r,nodes:a.nodes,targets:a.targets,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,errors:a.errors}}async function V(e,t,n=5e3,r={}){let s=r.gone===!0;return await e.send({type:"evaluate",code:`(async () => {
|
|
358
358
|
const start = Date.now()
|
|
359
359
|
const deadline = start + ${n}
|
|
360
360
|
const gone = ${s}
|
|
@@ -364,7 +364,17 @@ ${y}
|
|
|
364
364
|
const t = window.__sootsimTest
|
|
365
365
|
if (!t) return undefined // bridge not ready \u2014 indeterminate, not "gone"
|
|
366
366
|
try {
|
|
367
|
-
|
|
367
|
+
// gone-mode confirms a gate/screen LEFT \u2014 it only needs structural
|
|
368
|
+
// existence + layout, NOT the full-tree occlusion pass (pruneHidden).
|
|
369
|
+
// that pass (computeOccludedInspectNodeIds) walks the whole tree and
|
|
370
|
+
// does O(n\xB2)-ish rect-occlusion testing EVERY poll; on a large
|
|
371
|
+
// post-login app tree it costs seconds per poll, so --gone can never
|
|
372
|
+
// get two clean "absent" polls inside budget and falsely reports the
|
|
373
|
+
// gate as still blocked \u2014 the root cause of the 3pc PR-preview outage.
|
|
374
|
+
// presence-mode keeps pruneHidden so "appeared" still means
|
|
375
|
+
// visibly-reachable. a departed gate is unmounted or zero-sized, so the
|
|
376
|
+
// cheap structural+layout check is correct here and ~O(n) cheap.
|
|
377
|
+
const matches = await t.queryAll?.(gone ? { hasId: ID } : { hasId: ID, pruneHidden: true })
|
|
368
378
|
if (!Array.isArray(matches)) return undefined
|
|
369
379
|
return matches.find(present) || null
|
|
370
380
|
} catch {
|
|
@@ -387,7 +397,7 @@ ${y}
|
|
|
387
397
|
await new Promise((r) => setTimeout(r, 80))
|
|
388
398
|
}
|
|
389
399
|
return { found: false, elapsed: Date.now() - start }
|
|
390
|
-
})()`},{timeoutMs:n+1e3})??{found:!1,elapsed:n}}async function J(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function j(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function Q(e){await e.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); "cleared"'})}async function
|
|
400
|
+
})()`},{timeoutMs:n+1e3})??{found:!1,elapsed:n}}async function J(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function j(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function Q(e){await e.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); "cleared"'})}async function Y(e,t={}){let n=t.limit??20,r=t.failed===!1?"getRequests":"getFailedRequests",s=await e.send({type:"call",path:`__sootsimTest.${r}`,args:[n]});return Array.isArray(s)?s:[]}async function G(e){await e.send({type:"call",path:"__sootsimTest.clearRequests",args:[]})}async function q(e){let t=await e.send({type:"evaluate",code:`(() => {
|
|
391
401
|
const obs = window.__sootsimObservability;
|
|
392
402
|
if (!obs) return { ok: false };
|
|
393
403
|
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
@@ -397,7 +407,7 @@ ${y}
|
|
|
397
407
|
return { error: 'keyboard bridge getLayout() not available' }
|
|
398
408
|
}
|
|
399
409
|
return kb.getLayout()
|
|
400
|
-
})()`})??{error:"keyboard bridge returned no result"}}function
|
|
410
|
+
})()`})??{error:"keyboard bridge returned no result"}}function E(e){let t=e instanceof Error?e.message:String(e);return t.includes("call target not found: SootSim.bridges.mainShell")||t.includes("test bridge unavailable before app-in-worker boot")}async function P(e,t=0){let n=Date.now()+Math.max(0,t);for(;;)try{return await e.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(r){if(!E(r)||Date.now()>=n)throw r;await new Promise(s=>setTimeout(s,50))}}async function re(e){let t=await e.send({type:"evaluate",code:`(async () => {
|
|
401
411
|
const test = window.__sootsimTest
|
|
402
412
|
const kb = window.__sootsimKeyboard
|
|
403
413
|
const navSnap =
|
|
@@ -421,7 +431,7 @@ ${y}
|
|
|
421
431
|
})()
|
|
422
432
|
: null
|
|
423
433
|
return { nav: navSnap, keyboard }
|
|
424
|
-
})()`});return{shell:await
|
|
434
|
+
})()`});return{shell:await P(e,500).catch(()=>null),nav:t?.nav??null,keyboard:t?.keyboard??null}}async function se(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function oe(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function ae(e,t){let n=t==="sheets"?"findSheets":"findPortals";return e.send({type:"evaluate",code:`window.__sootsimDebug.${n}()`})}async function ie(e,t,n=50){let r=t&&t!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(t)}, ${n})`:`window.__sootsimDebug.recent(undefined, ${n})`;return e.send({type:"evaluate",code:r})}async function le(e,t,n){let r=n.length>0?n.map(s=>JSON.stringify(s)).join(", "):t==="disable"?"'all'":"";return e.send({type:"evaluate",code:`window.__sootsimDebug.${t}(${r})`})}async function ue(e){return await e.send({type:"evaluate",code:`(async () => {
|
|
425
435
|
const host = window.__sootsimRenderHost
|
|
426
436
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
427
437
|
const hostMem = performance.memory
|
|
@@ -436,4 +446,4 @@ ${y}
|
|
|
436
446
|
workerHeap: stats?.memory?.workerHeap ?? null,
|
|
437
447
|
hostHeap: hostMem,
|
|
438
448
|
}
|
|
439
|
-
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function ce(e){if(e.total===0)return"nothing recorded";let t=[],n=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],r=new Set;for(let s of n){let o=e.byKind[s];o&&(t.push(`${o} ${s}${o===1?"":"s"}`),r.add(s))}for(let[s,o]of Object.entries(e.byKind))!r.has(s)&&o&&t.push(`${o} ${s}${o===1?"":"s"}`);return t.join(" \xB7 ")}export{
|
|
449
|
+
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function ce(e){if(e.total===0)return"nothing recorded";let t=[],n=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],r=new Set;for(let s of n){let o=e.byKind[s];o&&(t.push(`${o} ${s}${o===1?"":"s"}`),r.add(s))}for(let[s,o]of Object.entries(e.byKind))!r.has(s)&&o&&t.push(`${o} ${s}${o===1?"":"s"}`);return t.join(" \xB7 ")}export{A as a,L as b,D as c,N as d,H as e,$ as f,B as g,M as h,C as i,O as j,W as k,F as l,v as m,T as n,R as o,z as p,K as q,V as r,J as s,j as t,Q as u,Y as v,G as w,q as x,U as y,X as z,Z as A,ee as B,te as C,ne as D,E,P as F,re as G,se as H,oe as I,ae as J,ie as K,le as L,ue as M,ce as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},c=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),p=new Set(["do","get","wait","shell","debug"]),b={tap:"sootsim do tap","double-tap":"sootsim do double-tap","tap-text":"sootsim do tap-text","tap-id":"sootsim do tap-id",type:"sootsim do type","type-into":"sootsim do type-into",key:"sootsim do key",dispatch:"sootsim do dispatch",dismiss:"sootsim do dismiss",scroll:"sootsim do scroll",drag:"sootsim do drag",swipe:"sootsim do swipe",pinch:"sootsim do pinch",reload:"sootsim do reload",sleep:"sootsim do sleep",settle:"sootsim do settle",tree:"sootsim get tree",a11y:"sootsim get a11y",count:"sootsim get count",layout:"sootsim get layout",url:"sootsim get url",globals:"sootsim get globals",errors:"sootsim get errors",warnings:"sootsim get warnings",requests:"sootsim get requests",node:"sootsim get node",state:"sootsim debug state",js:"sootsim debug js",eval:"sootsim debug eval",perf:"sootsim debug perf","sample-color":"sootsim debug sample-color","find-id":"sootsim find --testid",query:"sootsim find --text|--role|--type|--pressable|--visible",capture:"sootsim screenshot"},u=new Set(["preview","test","detox","maestro","flow","record","profile","cpu-profile","react","screenshot","screenshots","screenshot-mode","three-mode","3d-mode","inspect","debug","timeline","what-happened","diagnose","shell","assert","device","open","list","use","focus","claim","close","config","compat","scan","electron","login","logout","whoami","install","setup-repo","install-desktop","server","daemon","runtime","upgrade","launch","start","skills","upload","app-fonts","keys","hints","agent-wrapper","agent",...c,...Object.keys(b)]);function h(g){let i=g.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<i.length;){let o=i[s];if(o==="--"){e.commandArgs.push(...i.slice(s+1));break}let a=Object.entries(m).find(([n,t])=>n===o||t.short===o);if(a){let[n,t]=a,l=n.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[l]=!0,s++;else{let r=i[s+1];if(r===void 0||r.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let d=Number(r);if(Number.isNaN(d)){console.error(` warning: ${o} requires a number, got "${r}"`),s+=2;continue}e.globalFlags[l]=d}else e.globalFlags[l]=r;s+=2}continue}if(!e.command&&!o.startsWith("-")){let n=o.indexOf("-");if(n>0){let t=o.slice(0,n),l=o.slice(n+1);if(p.has(t)&&l.length>0){e.command=t;let r=i.slice(s+1);e.commandArgs=[l,...r[0]==="--"?r.slice(1):r];break}}if(u.has(o)){e.command=o;let t=i.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=i.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{c as a,b,h as c};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{i as n}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{i as n}from"./chunk-BJH7O6J6.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
|
|
3
3
|
`)}export{g as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as D,mkdirSync as O,readFileSync as g,rmSync as s,writeFileSync as P}from"fs";import{tmpdir as R}from"os";import{dirname as x,join as A,resolve as v}from"path";import{execFileSync as I}from"child_process";import{readFileSync as S}from"fs";import{createRequire as _}from"module";var o=null;function u(r){o||(o=b());try{return o(r)}catch{return null}}function b(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=T();return n||C()}return()=>null}function y(){return r=>{try{let n=S(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,E=16;function T(){if(!process.versions?.bun)return null;try{let r=_(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return a=>{if(Number(i.symbols.proc_pidinfo(a,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(E);return p>0?p:null}}catch{return null}}function C(){return r=>{try{let t=I("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",F=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function m(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of F){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=m(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function J(){return m(process.ppid)}function l(){if(process.env[f])return v(process.env[f]);let r=L();return A(R(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!D(r))return null;try{let n=JSON.parse(g(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function j(){return h()?.simId||null}function K(r){let n=r.trim();if(!n)return;let t=l();O(x(t),{recursive:!0}),P(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
4
4
|
`)}function X(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e,X as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l}from"./chunk-WWFXKF3K.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-3OXUZ4YW.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-23HEVNFL.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
|
|
3
3
|
dev checkouts skip the auto-install of the persistent launchd / systemd
|
|
4
4
|
agent. start the daemon manually in another shell with:
|
|
5
5
|
bun sootsim server
|
|
6
|
-
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-
|
|
6
|
+
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-ZDL4HAJ6.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
|
|
7
7
|
if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as k,d as T,f as C}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as k,d as T,f as C}from"./chunk-V2UHENRM.js";import{E as v,F as P}from"./chunk-3OXUZ4YW.js";import{WebSocket as I}from"ws";function x(){let e=v();return e&&P(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(r,i){super(r),this.name="BridgeSimLockedError",this.lock=i}};function $(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function R(e,r={}){let i=new Set,a=r.port??x(),l=r.commandTimeoutMs??15e3,t,m="none",p=new Set(r.stripBooleanFlags??[]),b=new Set(r.stripValueFlags??[]);for(let n=0;n<e.length;n++){let d=e[n];if(d==="--port"||d==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(d.startsWith("--port=")){i.add(n),a=Number(d.slice(7));continue}if(d==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),l=Number(e[n+1])),n++;continue}if(d==="--sim"||d==="--session"||d==="--tab"){i.add(n),n+1<e.length&&(i.add(n+1),t=e[n+1]?.trim()||void 0,m="flag"),n++;continue}let s=d.startsWith("--sim=")?d.slice(6):d.startsWith("--session=")?d.slice(10):d.startsWith("--tab=")?d.slice(6):void 0;if(s!==void 0){i.add(n),t=s.trim()||void 0,m="flag";continue}if(p.has(d)){i.add(n);continue}b.has(d)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!t){let n=T();n&&(t=n.trim()||void 0,m="saved")}return{positional:e.filter((n,d)=>!i.has(d)),wsPort:a,simId:t,simIdSource:m,commandTimeoutMs:l}}function E(e,r={}){let i=1,a=r.commandTimeoutMs??15e3,l=new Map,t=new I(`ws://localhost:${e}`),m=k(),p=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:m.key,cliIdentitySource:m.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let g=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${g}`))})}),b=!1,n=!1;function d(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",g=$(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${g})
|
|
3
3
|
`)}return t.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o.i>0&&!b&&(b=!0,process.stderr.write(`
|
|
4
4
|
\u26A0 ${o.i} other CLI identity/identities are driving this sim
|
|
5
5
|
taps, scrolls, and keyboard input from multiple agents will collide on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as d}from"./chunk-WWFXKF3K.js";import{a as p,d as w,h as $,j as y}from"./chunk-52IG45RY.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-3OXUZ4YW.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
|
|
3
3
|
sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -22,4 +22,4 @@ examples:
|
|
|
22
22
|
sootsim runtime install 1.2.3
|
|
23
23
|
sootsim runtime install --channel beta
|
|
24
24
|
sootsim runtime use 1.2.3
|
|
25
|
-
`)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-
|
|
25
|
+
`)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-CZ67HGJ7.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-IGCYRC3B.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-XC36Y7B2.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-XC36Y7B2.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"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-IGCYRC3B.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim config \u2014 manage sootsim configuration
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (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}from"./chunk-DLVWPEI4.js";import"./chunk-BPSFMOFQ.js";import"./chunk-4XZ4WY4A.js";import"./chunk-SPM7MIOO.js";import"./chunk-IGRECENR.js";import"./chunk-WWFXKF3K.js";import"./chunk-3RTBGCJF.js";import"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import"./chunk-V2UHENRM.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";export{e as buildOpenUrl,d as buildShellUrl,q as closeSimsBulk,r as planBulkCloseTargets,i as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,p as runClaimCommand,s as runCloseCommand,o as runFocusCommand,l as runListCommand,m as runOpenCommand,n as runUseCommand,j as signalDriverLaunchConnected,f as summarizeSimUrl,k as terminatePlaywrightHostsForSims,h as waitForSimMatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-IGCYRC3B.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as T,b as N}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as N}from"./chunk-RKJS56NM.js";import"./chunk-LK74SKOV.js";import{c as O}from"./chunk-7IJSQITG.js";import"./chunk-UMR6DJZG.js";import"./chunk-E6MZZ2JK.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-D4S3A7VQ.js";import"./chunk-7NLXLHEX.js";import"./chunk-BJH7O6J6.js";import{g as I,o as C,p as w,q as B}from"./chunk-3OXUZ4YW.js";import{a as W}from"./chunk-IGCYRC3B.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
|
|
3
3
|
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
5
|
<plist version="1.0">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{f,m as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-4XZ4WY4A.js";import{H as A,I as D,J as O,K as x,L as v}from"./chunk-SPM7MIOO.js";import{c as S,e as $,g as N}from"./chunk-WWFXKF3K.js";import"./chunk-V2UHENRM.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
|
|
3
3
|
sootsim debug \u2014 drive __sootsimDebug from the terminal
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -167,7 +167,7 @@ examples:
|
|
|
167
167
|
} : null,
|
|
168
168
|
samples,
|
|
169
169
|
}
|
|
170
|
-
})()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-
|
|
170
|
+
})()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-OFQEFD7A.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
171
171
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await A(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await D(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
172
172
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
173
173
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-LRAMRKPE.js";import"./chunk-MB5HWJMY.js";import"./chunk-PXMMDJOI.js";import"./chunk-O2M2AP7H.js";import"./chunk-PISK5DP6.js";import"./chunk-S5UDIVJX.js";import"./chunk-527SSINQ.js";import"./chunk-DLVWPEI4.js";import"./chunk-BPSFMOFQ.js";import"./chunk-4XZ4WY4A.js";import"./chunk-SPM7MIOO.js";import"./chunk-IGRECENR.js";import"./chunk-WWFXKF3K.js";import"./chunk-3RTBGCJF.js";import"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import"./chunk-V2UHENRM.js";import"./chunk-RKJS56NM.js";import"./chunk-LK74SKOV.js";import"./chunk-UMR6DJZG.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-FPRRNX2V.js";import"./chunk-BJH7O6J6.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
|
|
3
3
|
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-PXMMDJOI.js";import{c as d,e as l,h as a}from"./chunk-WWFXKF3K.js";import"./chunk-V2UHENRM.js";import"./chunk-UMR6DJZG.js";import"./chunk-SLLX3SWM.js";import"./chunk-FPRRNX2V.js";import{f as c,g as r,h as g}from"./chunk-BJH7O6J6.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as E,e as R,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as E,e as R,h as b}from"./chunk-WWFXKF3K.js";import{b as v}from"./chunk-V2UHENRM.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
3
3
|
sootsim diagnose \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-VCJ6CAP5.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-3RTBGCJF.js";import"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import"./chunk-V2UHENRM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-6ECCKNU4.js";import"./chunk-VCJ6CAP5.js";import{a as v,g as h}from"./chunk-DLVWPEI4.js";import"./chunk-BPSFMOFQ.js";import"./chunk-4XZ4WY4A.js";import"./chunk-SPM7MIOO.js";import"./chunk-IGRECENR.js";import"./chunk-WWFXKF3K.js";import{b as f,g as u}from"./chunk-3RTBGCJF.js";import{a as p}from"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import{c as m}from"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import"./chunk-V2UHENRM.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim electron \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -15,4 +15,4 @@ examples:
|
|
|
15
15
|
sootsim electron
|
|
16
16
|
sootsim electron --port 5173
|
|
17
17
|
sootsim electron --profile qa
|
|
18
|
-
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-
|
|
18
|
+
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-AGDDOM5C.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-LRAMRKPE.js";import"./chunk-MB5HWJMY.js";import"./chunk-PXMMDJOI.js";import"./chunk-O2M2AP7H.js";import"./chunk-PISK5DP6.js";import"./chunk-S5UDIVJX.js";import{d as a,e as b}from"./chunk-527SSINQ.js";import"./chunk-DLVWPEI4.js";import"./chunk-BPSFMOFQ.js";import"./chunk-4XZ4WY4A.js";import"./chunk-SPM7MIOO.js";import"./chunk-IGRECENR.js";import"./chunk-WWFXKF3K.js";import"./chunk-3RTBGCJF.js";import"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import"./chunk-V2UHENRM.js";import"./chunk-RKJS56NM.js";import"./chunk-LK74SKOV.js";import"./chunk-UMR6DJZG.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-FPRRNX2V.js";import"./chunk-BJH7O6J6.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-7IJSQITG.js";import"./chunk-UMR6DJZG.js";import"./chunk-E6MZZ2JK.js";import"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-D4S3A7VQ.js";import"./chunk-7NLXLHEX.js";import"./chunk-BJH7O6J6.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as n,c as r,d as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-PIMLP3CT.js";import"./chunk-V2UHENRM.js";import"./chunk-IGCYRC3B.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as G}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-PIMLP3CT.js";import{a as bt,b as wt}from"./chunk-OJQCMP4V.js";import{a as Ke,h as we,k as ee}from"./chunk-527SSINQ.js";import{b as xt,c as $t,j as St}from"./chunk-DLVWPEI4.js";import"./chunk-BPSFMOFQ.js";import{a as Z,b as A,c as P,d as Oe,e as re,f as Y,g as ce,h as pe,i as gt,j as yt,k as Ae,l as ht}from"./chunk-4XZ4WY4A.js";import{D as mt,F as le,G as pt,M as ft,a as be,b as ze,c as Ye,d as Ge,e as Xe,f as Ve,g as Qe,h as Ze,i as et,j as tt,k as Ne,l as Fe,p as _e,q as ot,r as st,s as nt,t as rt,u as it,v as at,w as lt,x as ct,y as dt,z as ut}from"./chunk-SPM7MIOO.js";import"./chunk-IGRECENR.js";import{c as We,e as qe,f as He,g as Ue,h as Ie}from"./chunk-WWFXKF3K.js";import"./chunk-3RTBGCJF.js";import"./chunk-663EI6DT.js";import"./chunk-NUEWNRWO.js";import"./chunk-JHOXMDAW.js";import"./chunk-25PXT5BN.js";import{b as Le}from"./chunk-V2UHENRM.js";import{a as je}from"./chunk-SPNQRDT7.js";import{a as Te,c as Me}from"./chunk-E6MZZ2JK.js";import{a as Je}from"./chunk-O7HUOQQ7.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";import{existsSync as lo,mkdirSync as co,readFileSync as uo,rmSync as vt,writeFileSync as mo}from"fs";import{tmpdir as po}from"os";import{dirname as fo,join as go,resolve as yo}from"path";var fe=1,ho="SOOTSIM_INSPECT_NOTICE_PATH",bo=300*1e3,wo=15e3;function kt(){return yo(process.env[ho]||go(po(),"sootsim-inspect-notice-state.json"))}function xo(e,c){return Object.fromEntries(Object.entries(e).filter(([,n])=>typeof n?.signature=="string"&&Number.isFinite(n?.updatedAt)&&c-n.updatedAt<=bo))}function $o(e){let c=kt();if(!lo(c))return{version:fe,entries:{}};try{let n=JSON.parse(uo(c,"utf8"));return n.version!==fe||!n.entries||typeof n.entries!="object"?(vt(c,{force:!0}),{version:fe,entries:{}}):{version:fe,entries:xo(n.entries,e)}}catch{return vt(c,{force:!0}),{version:fe,entries:{}}}}function So(e){let c=kt();co(fo(c),{recursive:!0}),mo(c,JSON.stringify(e,null,2)+`
|
|
3
3
|
`)}function vo(e,c){let n=c.trim()||"default";return`${e}:${n}`}function Pe(e,c,n,l={}){let m=l.nowMs??Date.now(),a=l.cooldownMs??wo,g=$o(m),y=vo(e,c),T=g.entries[y];return T&&T.signature===n&&m-T.updatedAt<a?!1:(g.entries[y]={signature:n,updatedAt:m},So(g),!0)}var ko={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},To={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function Mo(e,c={}){return{...e?ko:To,...c}}function de(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function Io(e,c){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??c??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function ge(e,c){let n=Mo(!!c.agent,c.timing),l=0,m=null,a=null;try{await ee({bridge:e,maxMs:n.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let g=Date.now()+n.deadlineMs;for(;Date.now()<=g||l===0;){l++;let y=await c.resolve();if(m=y,y?.error==="bridge-not-ready"||y?.ambiguous||y?.nthOutOfRange)return{payload:y,result:null,attempts:l,failure:"special"};if(y&&typeof y.cx=="number"&&typeof y.cy=="number"){let M=await e.send({type:"tap",x:y.cx,y:y.cy,target:Io(y,c.textFallback)});if(a=M,de(M))return{payload:y,result:M,attempts:l}}let T=g-Date.now();if(T<=0)break;try{await ee({bridge:e,maxMs:Math.min(T,n.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(M=>setTimeout(M,Math.min(120,T)))}}return{payload:m,result:a,attempts:l,failure:m&&typeof m.cx=="number"?"missed":"not-found"}}async function Tt(e,c,n,l){return e.send({type:"tap",x:c,y:n,...l?{target:l}:{}})}async function Mt(e,c,n={}){let l=JSON.stringify(c);return ge(e,{agent:n.agent,timing:n.timing,resolve:()=>e.send({type:"evaluate",code:`(async () => {
|
|
4
4
|
const t = window.__sootsimTest
|
|
5
5
|
if (!t) return null
|
|
@@ -315,7 +315,7 @@ import{a as G}from"./chunk-MJQXUHDS.js";import{a as bt,b as wt}from"./chunk-MNIL
|
|
|
315
315
|
`);console.log(`${t??""}
|
|
316
316
|
|
|
317
317
|
${s}
|
|
318
|
-
`),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-
|
|
318
|
+
`),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-RKCUWIKI.js"),t=o();console.log(` available drivers (${t.length}):
|
|
319
319
|
`);let s=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 u=i.available?"\u2713":"\u2717",p=i.id.padEnd(s),w=i.kind.padEnd(r);console.log(` ${u} ${p} ${w} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let d=qe(m),z=I||"default",B=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),C=200;function V(o){let t=o.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(o)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(o)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=r||i||"html error page";return`<html ${o.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return t.length<=C?t:`${t.slice(0,C)}\u2026 (+${t.length-C} more bytes)`}function te(o){let t=o.displayUrl||o.url;return o.status!=null?`${o.method} ${t} -> ${o.status}${o.statusText?` ${o.statusText}`:""}`:o.error?`${o.method} ${t} -> ${o.error}`:`${o.method} ${t}`}async function S(o){let t=ue()?5e3:1500;try{let{settled:s,elapsed:r}=await ee({bridge:o,maxMs:t,pollMs:32,stablePolls:2});s||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.
|
|
320
320
|
`)}catch{}}function N(o,t){console.error(` tap failed: ${o} 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 L(){try{return await d.send({type:"evaluate",code:`(() => ({
|
|
321
321
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.120 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-QL5FA4KK.js";import"./chunk-6ECCKNU4.js";import"./chunk-WTPKU4YG.js";import"./chunk-WWFXKF3K.js";import"./chunk-V2UHENRM.js";import"./chunk-RKJS56NM.js";import"./chunk-LK74SKOV.js";import"./chunk-SLLX3SWM.js";import"./chunk-3OXUZ4YW.js";import"./chunk-IGCYRC3B.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
|