sootsim 0.1.65 → 0.1.66
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-44BHCTZA.js → agent-IW7CCSSI.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-BEP5WHZR.js → agent-wrapper-5DJBERZP.js} +2 -2
- package/dist-cli/chunks/{assert-SKDEGGRD.js → assert-RHILK3WR.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-PS2UDBP7.js +2 -0
- package/dist-cli/chunks/beta-XLYWSKEA.js +2 -0
- package/dist-cli/chunks/{chunk-X75XFMI4.js → chunk-22CO2ZE3.js} +2 -2
- package/dist-cli/chunks/{chunk-HNXQ2JP6.js → chunk-4LYNJPUM.js} +2 -2
- package/dist-cli/chunks/{chunk-P2C3JX3D.js → chunk-4NT6VRUU.js} +1 -1
- package/dist-cli/chunks/{chunk-3HC3F7CO.js → chunk-5MVFADNH.js} +2 -2
- package/dist-cli/chunks/{chunk-FRANP4PR.js → chunk-6AP6LXVV.js} +1 -1
- package/dist-cli/chunks/chunk-7NYW73Q6.js +2 -0
- package/dist-cli/chunks/{chunk-ELZHT3LB.js → chunk-AYBGSHQK.js} +2 -2
- package/dist-cli/chunks/{chunk-NJ2ACA36.js → chunk-BD76YSRN.js} +2 -2
- package/dist-cli/chunks/{chunk-TWKWXGN5.js → chunk-BEQD2DSK.js} +1 -1
- package/dist-cli/chunks/{chunk-PTUCXL7Y.js → chunk-BTHB3PMG.js} +3 -3
- package/dist-cli/chunks/{chunk-KKOOZPQP.js → chunk-D4VEI6MI.js} +1 -1
- package/dist-cli/chunks/{chunk-JC5L5ZJX.js → chunk-DEQ7RED3.js} +2 -2
- package/dist-cli/chunks/{chunk-UHYZO26V.js → chunk-EEMGSSWY.js} +2 -2
- package/dist-cli/chunks/{chunk-2EBGZC4A.js → chunk-EIQLQDKX.js} +2 -2
- package/dist-cli/chunks/{chunk-UXFF7AEE.js → chunk-EMMX6RF7.js} +2 -2
- package/dist-cli/chunks/{chunk-X2IIAIAP.js → chunk-FIIBCY5I.js} +2 -2
- package/dist-cli/chunks/{chunk-U5EQ5RWL.js → chunk-FXF2FHPI.js} +1 -1
- package/dist-cli/chunks/{chunk-ZW3HKMLQ.js → chunk-G4VWDOWB.js} +2 -2
- package/dist-cli/chunks/{chunk-FU33BTPL.js → chunk-GDCMTHEU.js} +1 -1
- package/dist-cli/chunks/chunk-GMKGJHVG.js +1 -0
- package/dist-cli/chunks/{chunk-UH4H5HXN.js → chunk-HIN5TAAL.js} +1 -1
- package/dist-cli/chunks/{chunk-O56DABNK.js → chunk-HWCZYW6M.js} +2 -2
- package/dist-cli/chunks/{chunk-6GZS5TCL.js → chunk-LCKLQSZX.js} +2 -2
- package/dist-cli/chunks/{chunk-OTWUZRFZ.js → chunk-LRBMW2WC.js} +2 -2
- package/dist-cli/chunks/{chunk-M4HI2THN.js → chunk-LVFWALS4.js} +2 -2
- package/dist-cli/chunks/{chunk-GHFA4O5B.js → chunk-M2Q4FXRE.js} +1 -1
- package/dist-cli/chunks/{chunk-TRHZBTPF.js → chunk-M3ZEZHOB.js} +1 -1
- package/dist-cli/chunks/{chunk-GHTXP5R7.js → chunk-MWTMLNGM.js} +3 -3
- package/dist-cli/chunks/{chunk-5MMRIGC3.js → chunk-NCSGLZRV.js} +2 -2
- package/dist-cli/chunks/chunk-NQKBIKUZ.js +1 -0
- package/dist-cli/chunks/{chunk-FPOQPEGK.js → chunk-QMRXLBPN.js} +2 -2
- package/dist-cli/chunks/{chunk-MLPLYQGK.js → chunk-T4YLDM5C.js} +3 -3
- package/dist-cli/chunks/{chunk-L2SDB6G5.js → chunk-TJEP4DBA.js} +2 -2
- package/dist-cli/chunks/{chunk-46OKLW3Z.js → chunk-UMXVWFST.js} +1 -1
- package/dist-cli/chunks/{chunk-GZCZ4GCS.js → chunk-UNSLXX7V.js} +2 -2
- package/dist-cli/chunks/{chunk-5ZB5ZN5Z.js → chunk-V4SZERWD.js} +1 -1
- package/dist-cli/chunks/{chunk-VGQXIMEX.js → chunk-VRV2X4X2.js} +1 -1
- package/dist-cli/chunks/{chunk-S46M5JZP.js → chunk-WAOLC7WV.js} +1 -1
- package/dist-cli/chunks/{chunk-R2QEABGZ.js → chunk-X4HQLK4V.js} +1 -1
- package/dist-cli/chunks/chunk-XOTJSR4T.js +2 -0
- package/dist-cli/chunks/{chunk-MSBMGQJE.js → chunk-XZ5SQJM2.js} +2 -2
- package/dist-cli/chunks/chunk-YSQV4D7P.js +1 -0
- package/dist-cli/chunks/{chunk-NTEZEQSB.js → chunk-Z6HSVZIO.js} +2 -2
- package/dist-cli/chunks/cli-version-ESQ2S6N5.js +2 -0
- package/dist-cli/chunks/{compat-MDZTV64M.js → compat-I7JXYUJN.js} +3 -3
- package/dist-cli/chunks/{config-DRGNQOYL.js → config-3HR5RKVH.js} +2 -2
- package/dist-cli/chunks/control-TDZXFNVT.js +2 -0
- package/dist-cli/chunks/{cpu-profile-JQAGHLDS.js → cpu-profile-ZVHMTVAU.js} +2 -2
- package/dist-cli/chunks/{daemon-3RT7EABW.js → daemon-VYRTYH55.js} +2 -2
- package/dist-cli/chunks/{debug-CYINYNWV.js → debug-CQ6Y7GJ2.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-JAYU7BBM.js +2 -0
- package/dist-cli/chunks/{detox-DUABQYC6.js → detox-7ZKTGLDR.js} +2 -2
- package/dist-cli/chunks/{device-KSSSQOQC.js → device-4M6Z7E2N.js} +2 -2
- package/dist-cli/chunks/{diagnose-NUDACXIR.js → diagnose-SMQLYGNX.js} +2 -2
- package/dist-cli/chunks/drivers-SIY6JBEM.js +2 -0
- package/dist-cli/chunks/{electron-LC3Y74FA.js → electron-6N2MIN5W.js} +3 -3
- package/dist-cli/chunks/flow-BZEWL7UQ.js +2 -0
- package/dist-cli/chunks/{hints-EOARRVNB.js → hints-RJCZS2E3.js} +2 -2
- package/dist-cli/chunks/{home-paths-HOBR3K3B.js → home-paths-DCUNA3CD.js} +2 -2
- package/dist-cli/chunks/{inspect-QCZVODE6.js → inspect-T5NC7HHB.js} +3 -3
- package/dist-cli/chunks/install-YTJI5RS7.js +2 -0
- package/dist-cli/chunks/{install-desktop-W2OOILJG.js → install-desktop-C7424OSW.js} +3 -3
- package/dist-cli/chunks/{keys-RR43E2O3.js → keys-TXUQOAZ3.js} +2 -2
- package/dist-cli/chunks/{launch-GAPSA5HQ.js → launch-MVA44QTC.js} +3 -3
- package/dist-cli/chunks/{login-IADXSJEW.js → login-NHO2WTHC.js} +4 -4
- package/dist-cli/chunks/{logout-AT33MGA7.js → logout-SRRWADCE.js} +2 -2
- package/dist-cli/chunks/{maestro-G36ATKHQ.js → maestro-UHNXEZAN.js} +2 -2
- package/dist-cli/chunks/{preview-BJUMMDBL.js → preview-ETIUP7KC.js} +2 -2
- package/dist-cli/chunks/{profile-CEQNS53P.js → profile-MY5JFVIF.js} +2 -2
- package/dist-cli/chunks/{react-BPEDK3TN.js → react-KCMC4GL3.js} +2 -2
- package/dist-cli/chunks/{record-73CGQ3EP.js → record-DHDSXC2Y.js} +7 -6
- package/dist-cli/chunks/runtime-AJP6V5LM.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-IYK2HNPG.js → runtime-delivery-LQZIWQU6.js} +2 -2
- package/dist-cli/chunks/{screenshot-GUM2U2PN.js → screenshot-4KPEEI6I.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-VUBCO7T2.js → screenshot-mode-USPWASI3.js} +2 -2
- package/dist-cli/chunks/{screenshots-JENURQSV.js → screenshots-EPEDNA6H.js} +2 -2
- package/dist-cli/chunks/{server-PVAO3OA2.js → server-222QT33M.js} +2 -2
- package/dist-cli/chunks/setup-repo-D56L3CEB.js +2 -0
- package/dist-cli/chunks/{skills-4JI327YS.js → skills-6XRREE2M.js} +2 -2
- package/dist-cli/chunks/{start-7YB4I5V5.js → start-YCAZBZEX.js} +4 -4
- package/dist-cli/chunks/store-Z32KZ34K.js +2 -0
- package/dist-cli/chunks/telemetry-RFTX2BZK.js +2 -0
- package/dist-cli/chunks/{test-5C6NYF62.js → test-6TNRHSWC.js} +3 -3
- package/dist-cli/chunks/{three-mode-C6TE63VR.js → three-mode-MDOLHGXW.js} +2 -2
- package/dist-cli/chunks/{timeline-NFYS6IPO.js → timeline-72MWE44G.js} +2 -2
- package/dist-cli/chunks/{upgrade-KROEHYG2.js → upgrade-IHZ4DFAE.js} +2 -2
- package/dist-cli/chunks/upload-G5C7LJWG.js +2 -0
- package/dist-cli/chunks/{web-UTOZ7MRF.js → web-JLJSJUS2.js} +2 -2
- package/dist-cli/chunks/{what-happened-FCP2U43H.js → what-happened-BUXSJ3QS.js} +2 -2
- package/dist-cli/chunks/{whoami-O6XVOJBF.js → whoami-2EYGCRDQ.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/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.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/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/vite-base.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-SMQMN7WS.js +0 -2
- package/dist-cli/chunks/beta-DEQZ2J7G.js +0 -2
- package/dist-cli/chunks/chunk-5MRRLWSD.js +0 -1
- package/dist-cli/chunks/chunk-B32KMMQV.js +0 -2
- package/dist-cli/chunks/chunk-CBRKFAOD.js +0 -1
- package/dist-cli/chunks/chunk-DLSOZVYM.js +0 -1
- package/dist-cli/chunks/chunk-E6CRWOWO.js +0 -2
- package/dist-cli/chunks/cli-version-HH7DAYBK.js +0 -2
- package/dist-cli/chunks/control-NCUWAXPH.js +0 -2
- package/dist-cli/chunks/demo-app-registry-JGIZ7NN7.js +0 -2
- package/dist-cli/chunks/drivers-CKGMOVM4.js +0 -2
- package/dist-cli/chunks/flow-3AHNNHF7.js +0 -2
- package/dist-cli/chunks/install-747G2O4S.js +0 -2
- package/dist-cli/chunks/runtime-QR5IHGKJ.js +0 -2
- package/dist-cli/chunks/setup-repo-ECVECJZQ.js +0 -2
- package/dist-cli/chunks/store-2MXXL4QE.js +0 -2
- package/dist-cli/chunks/telemetry-GIA7FIKW.js +0 -2
- package/dist-cli/chunks/upload-OS3J5ZOS.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as c,b as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as p}from"./chunk-GDCMTHEU.js";import{a as m,c as h}from"./chunk-AYBGSHQK.js";import{a as l,b as u,c as d}from"./chunk-HIN5TAAL.js";function O(){let e=l();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function P(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=l();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await d(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var f={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:O,launch:P};function x(){let e=c();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function k(e){let r=c();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await p(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:x,launch:k};import{spawn as I}from"child_process";import{closeSync as L,mkdtempSync as _,openSync as R,readFileSync as A}from"fs";import{createRequire as M}from"module";import{tmpdir as g}from"os";import{join as w}from"path";var $=`
|
|
3
3
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
4
4
|
const url = process.env.SOOTSIM_PW_URL;
|
|
5
5
|
const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-D4VEI6MI.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-JLJSJUS2.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-JLJSJUS2.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-D4VEI6MI.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.66 | (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}from"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-XOTJSR4T.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";export{d as buildOpenUrl,c as buildShellUrl,n as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,m as runClaimCommand,o as runCloseCommand,l as runFocusCommand,i as runListCommand,j as runOpenCommand,k as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as I,e as N,i as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as I,e as N,i as S}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as T,b as _}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as _}from"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-7NYW73Q6.js";import{g as I,o as C,p as w,q as B}from"./chunk-BEQD2DSK.js";import{a as W}from"./chunk-D4VEI6MI.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
|
|
3
3
|
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:s}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
5
|
<plist version="1.0">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as f}from"./chunk-5MVFADNH.js";import{b as A}from"./chunk-M3ZEZHOB.js";import{E as D,F as O,G as x,H as T,I as v}from"./chunk-V4SZERWD.js";import{c as S,e as $,g as N}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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-T5NC7HHB.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 D(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 O(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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-MWTMLNGM.js";import"./chunk-LVFWALS4.js";import"./chunk-YSQV4D7P.js";import"./chunk-4LYNJPUM.js";import"./chunk-EMMX6RF7.js";import"./chunk-EEMGSSWY.js";import"./chunk-XZ5SQJM2.js";import"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-UNSLXX7V.js";import"./chunk-XOTJSR4T.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-LRBMW2WC.js";import"./chunk-FXF2FHPI.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-YSQV4D7P.js";import"./chunk-UNSLXX7V.js";import"./chunk-LRBMW2WC.js";import{f as c,g as r,h as g}from"./chunk-FXF2FHPI.js";import{c as d,e as l,h as a}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as E,e as R,h as b}from"./chunk-G4VWDOWB.js";import{b as v}from"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GMKGJHVG.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-6AP6LXVV.js";import"./chunk-GMKGJHVG.js";import{a as v,f as h}from"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import{b as f,g as u}from"./chunk-Z6HSVZIO.js";import{a as p}from"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import{c as m}from"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-XOTJSR4T.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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-C7424OSW.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-MWTMLNGM.js";import"./chunk-LVFWALS4.js";import"./chunk-YSQV4D7P.js";import"./chunk-4LYNJPUM.js";import"./chunk-EMMX6RF7.js";import"./chunk-EEMGSSWY.js";import{d as a,e as b}from"./chunk-XZ5SQJM2.js";import"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-UNSLXX7V.js";import"./chunk-XOTJSR4T.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-LRBMW2WC.js";import"./chunk-FXF2FHPI.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
|
|
@@ -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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-FIIBCY5I.js";import"./chunk-VRV2X4X2.js";import"./chunk-D4VEI6MI.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.66 | (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-BEQD2DSK.js";import"./chunk-D4VEI6MI.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.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-FIIBCY5I.js";import{a as Je,b as We}from"./chunk-WAOLC7WV.js";import{a as X,b as C,c as B,d as z,e as ue,f as re,g as lt,h as ct,i as Te}from"./chunk-5MVFADNH.js";import{a as je,h as ce}from"./chunk-XZ5SQJM2.js";import{b as dt,c as ut,i as mt}from"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import{a as Le}from"./chunk-M3ZEZHOB.js";import{A as rt,C as se,D as it,J as at,a as de,b as qe,c as He,d as Ue,e as Ke,f as ze,g as Ye,h as ve,i as ke,n as Ge,o as Xe,p as Ve,q as Qe,r as Ze,s as et,t as tt,u as ot,v as st,w as nt}from"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import{a as xe,c as $e,d as Pe}from"./chunk-X4HQLK4V.js";import{a as Oe}from"./chunk-XOTJSR4T.js";import{c as Ee,e as De,f as Ce,g as Be,h as Se}from"./chunk-G4VWDOWB.js";import{b as Re}from"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{existsSync as Ut,mkdirSync as Kt,readFileSync as zt,rmSync as pt,writeFileSync as Yt}from"fs";import{tmpdir as Gt}from"os";import{dirname as Xt,join as Vt,resolve as Qt}from"path";var ie=1,Zt="SOOTSIM_INSPECT_NOTICE_PATH",eo=300*1e3,to=15e3;function ft(){return Qt(process.env[Zt]||Vt(Gt(),"sootsim-inspect-notice-state.json"))}function oo(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=eo))}function so(s){let d=ft();if(!Ut(d))return{version:ie,entries:{}};try{let a=JSON.parse(zt(d,"utf8"));return a.version!==ie||!a.entries||typeof a.entries!="object"?(pt(d,{force:!0}),{version:ie,entries:{}}):{version:ie,entries:oo(a.entries,s)}}catch{return pt(d,{force:!0}),{version:ie,entries:{}}}}function no(s){let d=ft();Kt(Xt(d),{recursive:!0}),Yt(d,JSON.stringify(s,null,2)+`
|
|
3
3
|
`)}function ro(s,d){let a=d.trim()||"default";return`${s}:${a}`}function Me(s,d,a,l={}){let g=l.nowMs??Date.now(),i=l.cooldownMs??to,h=so(g),S=ro(s,d),I=h.entries[S];return I&&I.signature===a&&g-I.updatedAt<i?!1:(h.entries[S]={signature:a,updatedAt:g},no(h),!0)}async function gt(s,d={args:[]}){let a=await qe(s);if(C(d.args)){B(a);return}console.log(` nodes: ${a.nodes}`)}function Ie(s,d){let a=s.indexOf(d);return a>=0&&a+1<s.length?s[a+1]:null}async function yt(s){let{bridge:d,args:a,positional:l}=s,g=a.includes("--verbose")||a.includes("-v"),i=C(a),h=g&&!i,S=a.includes("--watch")||a.includes("-w"),I=1e3,k=a.includes("--compact"),b=a.includes("--no-xy"),v=Ie(a,"--testid-like"),N=Ie(a,"--only"),T=Ie(a,"--subtree"),E=l[1],J=E?/[*?]/.test(E):!1,c=!J&&!N?E:void 0,K=N??(J?E:void 0),j=async()=>{await ue(d,{verbose:h});let Y=await Ke(d,{describe:!0,verbose:g,filter:c||"",testIdLike:v||void 0,onlyGlob:K||void 0,subtreeRoot:T||void 0,compact:k,hideXy:b}),W=Y?.tree,x=Y?.shell,F=Y?.keyboard;if(i){B({shell:x,tree:W??"",keyboard:F});return}if(x&&typeof x=="object"){let O=[x.state?`state=${x.state}`:null,x.activeApp?`app=${x.activeApp}`:null,x.showSwitcher?"switcher":null,x.switcherPhase&&x.switcherPhase!=="idle"?`phase=${x.switcherPhase}`:null].filter(Boolean);O.length>0&&console.log(` shell: ${O.join(" ")}`)}if(typeof W=="string"&&W.startsWith("__SUBTREE_NOT_FOUND__:")){let O=W.slice(22);console.log(` subtree root not found: ${O}`),G("subtree-root-not-found",O);return}if(!W){let O=Y?.nodeCount??0;console.log(" no matching nodes found"),!(c||v||K||T)&&O<10&&G("app-still-loading",O);return}if(console.log(W),!(c||v||K||T)&&!S&&W.split(`
|
|
4
4
|
`).length>=80&&G("describe-use-filters"),F&&F.visible){let O=F.spec,V=[O?.keyboardType?`type=${O.keyboardType}`:null,O?.returnKeyType&&O.returnKeyType!=="default"?`return=${O.returnKeyType}`:null,F.mode!=="letters"?`mode=${F.mode}`:null,F.shifted?"shift":null,F.capsLock?"caps":null,O?.autoCapitalize&&O.autoCapitalize!=="sentences"?`autoCap=${O.autoCapitalize}`:null,F.accessoryBarId?`accessory=${F.accessoryBarId}`:null].filter(Boolean);console.log(`
|
|
5
5
|
keyboard: ${V.join(" ")||"visible"}`)}};if(S)for(console.log(` watching... (Ctrl+C to stop)
|
|
@@ -175,7 +175,7 @@ import{a as G}from"./chunk-X2IIAIAP.js";import{a as Je,b as We}from"./chunk-S46M
|
|
|
175
175
|
`);console.log(`${e??""}
|
|
176
176
|
|
|
177
177
|
${o}
|
|
178
|
-
`),process.exit(0)}let N=g.wsPort,T=g.simId,E=g.simIdSource,J=g.commandTimeoutMs;if(h==="list"&&l.some(t=>t==="--drivers"||t==="-D")){let{buildDriverListRows:t}=await import("./drivers-
|
|
178
|
+
`),process.exit(0)}let N=g.wsPort,T=g.simId,E=g.simIdSource,J=g.commandTimeoutMs;if(h==="list"&&l.some(t=>t==="--drivers"||t==="-D")){let{buildDriverListRows:t}=await import("./drivers-SIY6JBEM.js"),e=t();console.log(` available drivers (${e.length}):
|
|
179
179
|
`);let o=Math.max(...e.map(r=>r.id.length),6),n=Math.max(...e.map(r=>r.kind.length),4);for(let r of e){let u=r.available?"\u2713":"\u2717",m=r.id.padEnd(o),w=r.kind.padEnd(n);console.log(` ${u} ${m} ${w} ${r.description}`),r.available&&r.detail?console.log(` ${r.detail}`):!r.available&&r.reason&&console.log(` unavailable: ${r.reason}`)}return}let c=De(g),K=T||"default",j=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),D=200;function Y(t){let e=t.replace(/\s+/g," ").trim();if(!e)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(e)){let n=/<title[^>]*>([^<]+)<\/title>/i.exec(t)?.[1]?.trim(),r=/<body[^>]*>([\s\S]*?)<\//i.exec(t)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=n||r||"html error page";return`<html ${t.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return e.length<=D?e:`${e.slice(0,D)}\u2026 (+${e.length-D} more bytes)`}function W(t){let e=t.displayUrl||t.url;return t.status!=null?`${t.method} ${e} -> ${t.status}${t.statusText?` ${t.statusText}`:""}`:t.error?`${t.method} ${e} -> ${t.error}`:`${t.method} ${e}`}async function x(t){let e=ht()?5e3:1500;try{let{settled:o,elapsed:n}=await ne({bridge:t,maxMs:e,pollMs:32,stablePolls:2});o||process.stderr.write(` \u26A0 auto-wait timed out after ${n??e}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
180
180
|
`)}catch{}}async function F(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
181
181
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-TJEP4DBA.js";import"./chunk-6AP6LXVV.js";import"./chunk-BTHB3PMG.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-6AP6LXVV.js";import{a as x}from"./chunk-GDCMTHEU.js";import"./chunk-D4VEI6MI.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
|
|
3
3
|
`),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim install-desktop \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
23
|
+
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-RFTX2BZK.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-EEMGSSWY.js";import{d as c}from"./chunk-EIQLQDKX.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
|
|
3
3
|
created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
|
|
4
4
|
secret: ${t.secret}
|
|
5
5
|
`),console.log(` copy this now \u2014 we can't show it again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GMKGJHVG.js";import{b as m}from"./chunk-Z6HSVZIO.js";import{a as u}from"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
|
|
3
3
|
sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -13,4 +13,4 @@ options:
|
|
|
13
13
|
examples:
|
|
14
14
|
sootsim launch
|
|
15
15
|
sootsim launch --version 1.2.3
|
|
16
|
-
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-
|
|
16
|
+
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-AJP6V5LM.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as f,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as f,d as m}from"./chunk-EIQLQDKX.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so desktop uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${t}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-RFTX2BZK.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-RFTX2BZK.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-RFTX2BZK.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-DEQ7RED3.js";import{a as t,c as o}from"./chunk-EIQLQDKX.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as h,c as w}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as h,c as w}from"./chunk-MWTMLNGM.js";import"./chunk-LVFWALS4.js";import"./chunk-YSQV4D7P.js";import"./chunk-4LYNJPUM.js";import"./chunk-EMMX6RF7.js";import"./chunk-EEMGSSWY.js";import"./chunk-XZ5SQJM2.js";import"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-UNSLXX7V.js";import"./chunk-XOTJSR4T.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-LRBMW2WC.js";import"./chunk-FXF2FHPI.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-D4VEI6MI.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim preview \u2014 production-like preview
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-AYBGSHQK.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";function f(){console.log(`
|
|
3
3
|
sootsim profile \u2014 manage isolated storage profiles
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as w,e as b,h as m,i as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as w,e as b,h as m,i as f}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";function h(){console.log(`
|
|
3
3
|
sootsim react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as C}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as C}from"./chunk-4LYNJPUM.js";import"./chunk-EMMX6RF7.js";import{d as X}from"./chunk-EEMGSSWY.js";import"./chunk-NQKBIKUZ.js";import{d as H}from"./chunk-HIN5TAAL.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import{c as w,e as h}from"./chunk-G4VWDOWB.js";import{b as K}from"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{existsSync as ue,mkdirSync as O,readdirSync as me,readFileSync as fe,rmSync as W,writeFileSync as U}from"fs";import{homedir as pe,tmpdir as ge}from"os";import{dirname as P,extname as Y,join as E,resolve as we}from"path";var Q=6e4,he=3e4;async function N(e,r,o,i){let t=Math.max(2e4,i+he);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
|
|
3
3
|
the capture lock auto-releases, so simply retry the recording.
|
|
4
4
|
if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording/i.test(s)&&(console.error(` ${o} failed: ${s}
|
|
5
5
|
a prior recording was abandoned and its capture is still
|
|
6
6
|
releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
|
|
7
|
-
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var be=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin"]),ve=new Set(["start","stop","cancel","status","prelude-start"]);function ye(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){be.has(o)&&r++;continue}return ve.has(o)?{name:o,index:r}:null}return null}async function De(e,r){let o=ye(e);if(o){let a=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await ke(a,r);return}if(o.name==="prelude-start"){await Oe(a,r);return}if(o.name==="stop"){await Ie(a,r);return}if(o.name==="cancel"){await Me(a,r);return}await Be(a,r);return}let i=w(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),t=oe(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let
|
|
7
|
+
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var be=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin"]),ve=new Set(["start","stop","cancel","status","prelude-start"]);function ye(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){be.has(o)&&r++;continue}return ve.has(o)?{name:o,index:r}:null}return null}async function De(e,r){let o=ye(e);if(o){let a=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await ke(a,r);return}if(o.name==="prelude-start"){await Oe(a,r);return}if(o.name==="stop"){await Ie(a,r);return}if(o.name==="cancel"){await Me(a,r);return}await Be(a,r);return}let i=w(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),t=oe(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=u(e,"--output"),d=Number(u(e,"--duration")??"10");(!Number.isFinite(d)||d<=0)&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let l=1800;d>l&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 exceeds the ${l}s (30m) maximum`),process.exit(1));let f=Number(u(e,"--fps")??"30"),b=u(e,"--frames");if(b!==void 0){let a=Number(b);(!Number.isInteger(a)||a<=0)&&(console.error(` invalid --frames "${b}" \u2014 expected a positive integer count`),process.exit(1))}let V=e.includes("--open"),j=u(e,"--max-width")?Number(u(e,"--max-width")):void 0,p=Math.max(100,Math.round(d*1e3)),q=u(e,"--origin");if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await C("record",{originOverride:q,allowGitHubAuth:!0});let a=h({...i,commandTimeoutMs:6e4});try{await G(a),await te(a,t),await ne(a,q);let R=await ie(a,t,t==="combined"?n:void 0);R.ok||(console.error(` start failed: recording store refused to start (${t})`+(R.error?`: ${R.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${d}s`),await new Promise(x=>setTimeout(x,p)),await se(a);let _=await ae(a);de(_,V,t)}finally{a.close()}return}let A=b?Number(b):null,$=Re(s,c,A);V&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let v=h({...i,commandTimeoutMs:6e4});try{if(await Z(v),$==="png"){let S=A??10,g=I(c,`sootsim-frames-${M()}`);c&&Y(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),O(g,{recursive:!0});for(let m of me(g))/^frame-\d+\.png$/.test(m)&&W(E(g,m),{force:!0});console.log(` sampling ${S} frames over ${d}s \u2192 ${g}`);let y=await v.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${S}, durationMs: ${p}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!y.ok||!y.requestId)&&(console.error(` frame capture start failed: ${y.error??"unknown error"}`),process.exit(1)),await new Promise(m=>setTimeout(m,p));let ce=Date.now()+Math.max(5e3,p),F=null;for(;;){let m=await v.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${y.requestId})`});if(m||(console.error(" frame capture result missing"),process.exit(1)),m.done){m.ok||(console.error(` frame capture failed: ${m.error??"unknown error"}`),process.exit(1)),F=m.frames??[];break}Date.now()>=ce&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(T=>setTimeout(T,100))}F.forEach((m,T)=>{let le=`${g}/frame-${String(T+1).padStart(3,"0")}.png`;U(le,Buffer.from(m.data,"base64"))}),console.log(` saved ${F.length} frames`);return}if($==="gif"){let S=A??Math.max(10,Math.round(d*f/3)),g=I(c,`sootsim-${M()}.gif`);O(P(g),{recursive:!0}),console.log(` encoding gif: ${S} frames over ${d}s \u2192 ${g}`);let y=await N(v,`window.__sootsimRecorder.captureGif({ frames: ${S}, durationMs: ${p}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",p);y||(console.error(" gif capture returned no frames"),process.exit(1)),U(g,Buffer.from(y.data,"base64")),console.log(` saved: ${g} (${D(y.size)})`);return}let a=I(c,`sootsim-${M()}.${$}`);O(P(a),{recursive:!0});let R={format:$,fps:f,durationMs:p};n&&(R.layers=n);let _=await N(v,`window.__sootsimRecorder.start(${JSON.stringify(R)})`,`${$} start`,p);_.ok||(console.error(` start failed: ${_.error??"unknown error"}`),/render host not available|already streaming|already recording/i.test(_.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${$} for ${d}s \u2192 ${a}`),await new Promise(S=>setTimeout(S,p));let x=await N(v,"window.__sootsimRecorder.stop()",`${$} encode/flush`,p);x.ok||(console.error(` stop failed: ${x.error??"unknown error"}`),process.exit(1)),x.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await ee(v,a),console.log(` saved: ${a} (${D(x.size)})`)}finally{v.close()}}var $e=6e3;async function z(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:$e})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function Z(e){await z(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function ee(e,r){let o=[],i=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),i=t.offset,t.done)break}U(r,Buffer.concat(o))}function u(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Se(e){if(!e)return;let r=Y(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Re(e,r,o){return e||(o!=null?"png":Se(r)??"webm")}function M(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function xe(){let e=E(pe(),".sootsim","recordings");return O(e,{recursive:!0}),e}function I(e,r){return e?we(process.cwd(),e):E(xe(),r)}function D(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function oe(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function J(){return E(ge(),`sootsim-recording-${K()}.json`)}function B(){let e=J();if(!ue(e))return null;try{return{mode:"video",...JSON.parse(fe(e,"utf8"))}}catch{return W(e,{force:!0}),null}}function _e(e){U(J(),JSON.stringify(e,null,2))}function k(){W(J(),{force:!0})}function L(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
|
|
8
8
|
requested sim ${e}. record state is global (not per-sim);
|
|
9
|
-
this command acts on that session regardless of --sim.`)}async function ke(e,r){let o=B();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=w(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),t=oe(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format"),
|
|
9
|
+
this command acts on that session regardless of --sim.`)}async function ke(e,r){let o=B();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=w(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),t=oe(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format"),c=s==="mp4"?"mp4":"webm";s&&c!==s&&(console.error(` record start only supports webm or mp4 (got: ${s}). for gif/png use atomic mode: sootsim record --format ${s} --duration <s>`),process.exit(1));let d=Number(u(e,"--fps")??"30"),l=h({...i,commandTimeoutMs:15e3});try{if(t==="live"||t==="combined"){n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await C("record",{originOverride:u(e,"--origin"),allowGitHubAuth:!0}),await G(l),await te(l,t),await ne(l,u(e,"--origin"));let f=await ie(l,t,t==="combined"?n:void 0);f.ok||(console.error(` start failed: recording store refused to start (${t})`+(f.error?`: ${f.error}`:"")),process.exit(1))}else{await Z(l);let f={format:c,fps:d};n&&(f.layers=n);let b=await l.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(f)})`});b.ok||(console.error(` start failed: ${b.error??"unknown error"}`),process.exit(1))}_e({simId:i.simId??null,mode:t,format:c,fps:d,layers:n,startedAt:new Date().toISOString()}),console.log(t==="video"?` recording ${c} @ ${d}fps${n?` (${n})`:""} \u2014 run \`sootsim record stop --output <path>\` when done`:` recording ${t} \u2014 run \`sootsim record stop\` when done (add --open to launch the preview URL)`)}finally{l.close()}}async function Oe(e,r){let o=B();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=w(e,{port:r.port,stripBooleanFlags:[],stripValueFlags:["--origin"]}),t=h({...i,commandTimeoutMs:15e3});try{if(await G(t),!await t.send({type:"evaluate",code:`(() => {
|
|
10
10
|
const start = window.SootSim?.bridges?.startRecordingPrelude
|
|
11
11
|
if (typeof start !== 'function') return false
|
|
12
12
|
return Promise.resolve(start()).then((value) => value === true)
|
|
@@ -25,11 +25,11 @@ import{a as C}from"./chunk-HNXQ2JP6.js";import"./chunk-UXFF7AEE.js";import{d as
|
|
|
25
25
|
process; live/combined upload to /preview/<id>). if the run was
|
|
26
26
|
killed, the recording is abandoned and will NOT finish \u2014 reclaim
|
|
27
27
|
it now with \`sootsim record cancel\`, or it auto-reclaims when the
|
|
28
|
-
abandoned capture's deadline lapses.`:" no recording in progress")}finally{t.close()}}async function Me(e,r){let o=B();if(!o){let s=w(e,{port:r.port}),
|
|
28
|
+
abandoned capture's deadline lapses.`:" no recording in progress")}finally{t.close()}}async function Me(e,r){let o=B();if(!o){let s=w(e,{port:r.port}),c=h({...s,commandTimeoutMs:8e3});try{let d=await re(c);if(d==="recording"||d==="processing"){let l=await c.send({type:"evaluate",code:`(async () => {
|
|
29
29
|
const r = window.__sootsimRecorder;
|
|
30
30
|
if (r && typeof r.forceRelease === 'function') return await r.forceRelease();
|
|
31
31
|
return false;
|
|
32
|
-
})()`}).catch(()=>!1);console.log(
|
|
32
|
+
})()`}).catch(()=>!1);console.log(l?" reclaimed an abandoned recording (started by an atomic\n `record --duration` run or the record button whose owner is\n gone). the recorder is idle again \u2014 live/combined can start.":" a recording is in progress and still owned by a live atomic\n `record --duration` run or the in-browser record button \u2014 it\n will finish on its own and nothing was reclaimed.")}else console.log(" no recording in progress")}finally{c.close()}return}let i=w(e,{port:r.port});L(i.simId,o);let t=o.simId??i.simId??void 0,n=h({...i,simId:t,commandTimeoutMs:15e3});try{o.mode==="live"||o.mode==="combined"?await n.send({type:"evaluate",code:"void window.SootSim?.bridges?.cancelRecording?.()"}):await n.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"})}catch{}finally{k(),n.close()}console.log(" recording cancelled")}async function Ie(e,r){let o=B();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let i=w(e,{port:r.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});L(i.simId,o);let t=o.simId??i.simId??void 0,n=e.includes("--open"),s=h({...i,simId:t,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await se(s);let f=await ae(s);k(),de(f,n,o.mode);return}let c=u(e,"--output"),d=I(c,`sootsim-${M()}.${o.format}`);O(P(d),{recursive:!0});let l=await s.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});l.ok||(console.error(` stop failed: ${l.error??"unknown error"}`),k(),process.exit(1)),l.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),k(),process.exit(1)),await ee(s,d),k(),console.log(` saved: ${d} (${D(l.size)})`)}finally{s.close()}}async function G(e){await z(e,'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"')||(console.error(" SootSim.bridges.startRecording missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function te(e,r){await z(e,`(() => {
|
|
33
33
|
const fn = window.__sootsimCaptureBundle
|
|
34
34
|
if (typeof fn !== 'function') return false
|
|
35
35
|
const snap = fn()
|
|
@@ -42,6 +42,7 @@ import{a as C}from"./chunk-HNXQ2JP6.js";import"./chunk-UXFF7AEE.js";import{d as
|
|
|
42
42
|
if (typeof set !== 'function') return false
|
|
43
43
|
set({ token: ${JSON.stringify(i)}, user: null })
|
|
44
44
|
window.__sootsimPreviewUploadIdentity = ${JSON.stringify(t)}
|
|
45
|
+
window.__sootsimPreviewUseInjectedBearer = true
|
|
45
46
|
${n?`window.__sootsimUploadOrigin = ${JSON.stringify(n)}`:"delete window.__sootsimUploadOrigin"}
|
|
46
47
|
return true
|
|
47
48
|
})()`})||(console.error(" SootSim.bridges.setSession missing \u2014 this sim is running an engine\n build without CLI-injected preview auth. reload the sim or open a\n fresh one (`sootsim open --new`); if it persists, update sootsim."),process.exit(1))}async function ie(e,r,o){let i=o?JSON.stringify(o):"undefined";return await e.send({type:"evaluate",code:`window.SootSim.bridges.startRecording(${JSON.stringify(r)}, ${i}, { skipEntitlement: true })`})===!0?{ok:!0,error:null}:{ok:!1,error:await e.send({type:"evaluate",code:"(window.SootSim?.bridges?.getRecordingStartError?.() ?? null)"}).catch(()=>null)??null}}async function se(e){await e.send({type:"evaluate",code:"void window.SootSim.bridges.stopRecording()"})}async function ae(e){let r=Date.now()+Q;for(;Date.now()<r;){let o=await e.send({type:"evaluate",code:"(() => { const s = window.SootSim?.bridges?.getRecordingState?.(); return s ? { state: s.state, lastUpload: s.lastUpload, uploadError: s.uploadError } : null })()"});if(o&&o.state==="idle"){if(o.uploadError)return{uploadError:o.uploadError};if(o.lastUpload?.previewUrl)return{previewUrl:o.lastUpload.previewUrl,eventCount:o.lastUpload.eventCount}}await new Promise(i=>setTimeout(i,300))}return{uploadError:`upload did not settle within ${Q/1e3}s`}}function de(e,r,o){e.uploadError&&(console.error(` upload failed: ${e.uploadError}`),process.exit(1)),e.previewUrl||(console.error(" upload returned no preview URL"),process.exit(1)),console.log(` preview: ${e.previewUrl}`),console.log(` note: this URL is content-addressed \u2014 re-recording the same bundle
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-T4YLDM5C.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-NCSGLZRV.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";export{a as runRuntime};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-NCSGLZRV.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
|