sootsim 0.1.63 → 0.1.64
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-Z7M6NMR6.js → agent-SHMN3LWB.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-C7OMZWTX.js → agent-wrapper-ESDQSMYX.js} +2 -2
- package/dist-cli/chunks/{assert-OB4RMGU6.js → assert-X3GQJUDI.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-PH4II3F2.js +2 -0
- package/dist-cli/chunks/beta-YKR6YRXH.js +2 -0
- package/dist-cli/chunks/{chunk-EIKREDI4.js → chunk-2GAZ3JW7.js} +2 -2
- package/dist-cli/chunks/{chunk-SSTMIACF.js → chunk-346HJVD6.js} +1 -1
- package/dist-cli/chunks/{chunk-KX3FO4N4.js → chunk-34PKFCEI.js} +3 -3
- package/dist-cli/chunks/{chunk-VV265FEE.js → chunk-3R3BQDKC.js} +2 -2
- package/dist-cli/chunks/{chunk-HPVO7FJA.js → chunk-6X3I2LF4.js} +2 -2
- package/dist-cli/chunks/{chunk-GW77VHPI.js → chunk-ALDKVFW3.js} +2 -2
- package/dist-cli/chunks/{chunk-AYJGGZA4.js → chunk-BT6IVKHN.js} +1 -1
- package/dist-cli/chunks/chunk-CETSCOUK.js +1 -0
- package/dist-cli/chunks/{chunk-B3644N6L.js → chunk-DJIQVKM6.js} +10 -10
- package/dist-cli/chunks/{chunk-AMZB6WUA.js → chunk-DSLBZC6J.js} +2 -2
- package/dist-cli/chunks/{chunk-4H3UC4KB.js → chunk-E5EWHEA5.js} +2 -2
- package/dist-cli/chunks/{chunk-T7H7BKA7.js → chunk-FFVJK2R7.js} +2 -2
- package/dist-cli/chunks/{chunk-KRRNCL56.js → chunk-G4GM43A7.js} +2 -2
- package/dist-cli/chunks/{chunk-4232ZQOX.js → chunk-GKUKCZBA.js} +44 -44
- package/dist-cli/chunks/{chunk-AUMMYIP5.js → chunk-HERZHQFG.js} +2 -2
- package/dist-cli/chunks/{chunk-INXMOS35.js → chunk-J6TCNU6W.js} +1 -1
- package/dist-cli/chunks/chunk-KY2VMN66.js +1 -0
- package/dist-cli/chunks/{chunk-PX7QNGSM.js → chunk-L3MRXOBW.js} +3 -3
- package/dist-cli/chunks/{chunk-GICJIXEH.js → chunk-LKJI7RRW.js} +2 -2
- package/dist-cli/chunks/{chunk-7RZWW5VK.js → chunk-M4CADRP5.js} +2 -2
- package/dist-cli/chunks/{chunk-FSSJVHNV.js → chunk-N63QYSHT.js} +3 -3
- package/dist-cli/chunks/{chunk-PDMITY2P.js → chunk-OBL6OIK5.js} +1 -1
- package/dist-cli/chunks/chunk-OBSMT5TS.js +2 -0
- package/dist-cli/chunks/{chunk-ENACZPKI.js → chunk-PXRELDJJ.js} +2 -2
- package/dist-cli/chunks/{chunk-LJ7SH2KY.js → chunk-R6ZTREB6.js} +2 -2
- package/dist-cli/chunks/{chunk-C6UT7L2J.js → chunk-RKUDWRIN.js} +2 -2
- package/dist-cli/chunks/{chunk-2TVSYU32.js → chunk-RQHWF2OD.js} +2 -2
- package/dist-cli/chunks/{chunk-XILD5NPV.js → chunk-RRGCQNVD.js} +1 -1
- package/dist-cli/chunks/{chunk-DFRQMFUV.js → chunk-SMYSG4VE.js} +1 -1
- package/dist-cli/chunks/{chunk-4OW4EPBS.js → chunk-SVT7H2QF.js} +2 -2
- package/dist-cli/chunks/{chunk-PY25FDGX.js → chunk-T5TDH2UO.js} +1 -1
- package/dist-cli/chunks/{chunk-NWHQG4PG.js → chunk-UVDVALC7.js} +2 -2
- package/dist-cli/chunks/{chunk-E2EPTSHO.js → chunk-VE4QTDAY.js} +2 -2
- package/dist-cli/chunks/{chunk-MTTIJQ64.js → chunk-VGD57MTN.js} +2 -2
- package/dist-cli/chunks/{chunk-QW6P2JE2.js → chunk-WKVIKFMU.js} +1 -1
- package/dist-cli/chunks/chunk-WN4XOOK5.js +2 -0
- package/dist-cli/chunks/{chunk-IKFKEII6.js → chunk-X3QWOTLT.js} +1 -1
- package/dist-cli/chunks/chunk-XHD3XCT5.js +1 -0
- package/dist-cli/chunks/{chunk-DYUOXUBI.js → chunk-XHDHG6YH.js} +1 -1
- package/dist-cli/chunks/{chunk-5OZ7M24R.js → chunk-YGMHOMAJ.js} +2 -2
- package/dist-cli/chunks/{chunk-A3UFHDMY.js → chunk-YJIQYIHM.js} +1 -1
- package/dist-cli/chunks/{chunk-76MTBJ24.js → chunk-YXZFG3ZY.js} +1 -1
- package/dist-cli/chunks/{chunk-FEZCATWN.js → chunk-ZV2TI6OH.js} +2 -2
- package/dist-cli/chunks/cli-version-32VNOX3F.js +2 -0
- package/dist-cli/chunks/{compat-2AFC4MFV.js → compat-SOHG4UE5.js} +3 -3
- package/dist-cli/chunks/{config-KEEXBCOM.js → config-JQF6TGCG.js} +2 -2
- package/dist-cli/chunks/control-GIAGLNPG.js +2 -0
- package/dist-cli/chunks/{cpu-profile-RPSEEWCO.js → cpu-profile-3C7LHLJE.js} +2 -2
- package/dist-cli/chunks/{daemon-FCQLYFNH.js → daemon-SD773LNY.js} +2 -2
- package/dist-cli/chunks/{debug-QSYUF4WZ.js → debug-MNWVCAAF.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-JUKLYD4R.js +2 -0
- package/dist-cli/chunks/{detox-6PJOIC7Z.js → detox-VOWHHVNU.js} +2 -2
- package/dist-cli/chunks/{device-H7GVARBE.js → device-TFKPS72A.js} +2 -2
- package/dist-cli/chunks/{diagnose-H47FC64H.js → diagnose-J2BTJTGW.js} +2 -2
- package/dist-cli/chunks/drivers-HVKRY4MB.js +2 -0
- package/dist-cli/chunks/{electron-54ZCOKJE.js → electron-NHJHQAOJ.js} +3 -3
- package/dist-cli/chunks/flow-D6MKC5NH.js +2 -0
- package/dist-cli/chunks/{hints-V4VBWK3W.js → hints-XONGBPNI.js} +2 -2
- package/dist-cli/chunks/{home-paths-GUUGF76T.js → home-paths-KK7NZVIK.js} +2 -2
- package/dist-cli/chunks/{inspect-NDLLEBJK.js → inspect-7AINMWI2.js} +100 -100
- package/dist-cli/chunks/install-YPSDICK4.js +2 -0
- package/dist-cli/chunks/{install-desktop-FBK4PRA3.js → install-desktop-CRFW4MDL.js} +3 -3
- package/dist-cli/chunks/{keys-IWDHA2GT.js → keys-PLJITE2X.js} +2 -2
- package/dist-cli/chunks/{launch-MQEJM5XD.js → launch-FHMTFUI3.js} +3 -3
- package/dist-cli/chunks/{login-FFLXNWYQ.js → login-DCFVFSY3.js} +4 -4
- package/dist-cli/chunks/{logout-X4NH4PZG.js → logout-55UH67FS.js} +2 -2
- package/dist-cli/chunks/{maestro-V3GTFFX6.js → maestro-HNNW73KG.js} +2 -2
- package/dist-cli/chunks/{preview-YHY7IHFE.js → preview-EYIZWAEJ.js} +2 -2
- package/dist-cli/chunks/{profile-CFYRAH3J.js → profile-UOG2ET7W.js} +2 -2
- package/dist-cli/chunks/{react-L7NP2D6J.js → react-MRICF5YD.js} +2 -2
- package/dist-cli/chunks/record-33ZECMTQ.js +50 -0
- package/dist-cli/chunks/runtime-OG4HGCYH.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-CWSGC6RY.js → runtime-delivery-KYEJ3C24.js} +2 -2
- package/dist-cli/chunks/{screenshot-FAPUEO63.js → screenshot-B6B3CE2W.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-QB7FVHYI.js → screenshot-mode-QVII6GH6.js} +2 -2
- package/dist-cli/chunks/{screenshots-XAB5UKQB.js → screenshots-GYQ3JHAW.js} +2 -2
- package/dist-cli/chunks/{server-NLNCGLAT.js → server-G4WPXKFR.js} +2 -2
- package/dist-cli/chunks/setup-repo-2TQURG52.js +2 -0
- package/dist-cli/chunks/{skills-WBR5NZHN.js → skills-RF27H27Y.js} +2 -2
- package/dist-cli/chunks/{start-3I5VJI3S.js → start-EBOUYGAP.js} +4 -4
- package/dist-cli/chunks/store-FRMH2SYG.js +2 -0
- package/dist-cli/chunks/telemetry-EZIRTFFL.js +2 -0
- package/dist-cli/chunks/{test-LD2RIFI2.js → test-SATSKLC6.js} +3 -3
- package/dist-cli/chunks/{three-mode-5GPHB6BR.js → three-mode-XLTSGRVJ.js} +2 -2
- package/dist-cli/chunks/{timeline-AOVC2P3F.js → timeline-ELOCAU3S.js} +2 -2
- package/dist-cli/chunks/{upgrade-CU3DMD2C.js → upgrade-2OZLYETX.js} +2 -2
- package/dist-cli/chunks/upload-SJCUW6BT.js +2 -0
- package/dist-cli/chunks/{web-RNUV6WCK.js → web-YOKL7JUD.js} +2 -2
- package/dist-cli/chunks/{what-happened-BSRVVJPQ.js → what-happened-YGFJR2TI.js} +2 -2
- package/dist-cli/chunks/{whoami-ZAVHKQPY.js → whoami-GKH3GF3H.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-JF7VEKGP.js +0 -2
- package/dist-cli/chunks/beta-SZGXUHPX.js +0 -2
- package/dist-cli/chunks/chunk-CAFGDFEU.js +0 -1
- package/dist-cli/chunks/chunk-DAO2KA4O.js +0 -1
- package/dist-cli/chunks/chunk-SOKY5FGT.js +0 -1
- package/dist-cli/chunks/chunk-U42HSSAI.js +0 -2
- package/dist-cli/chunks/chunk-WCMYVXHS.js +0 -2
- package/dist-cli/chunks/cli-version-BB3PGPZA.js +0 -2
- package/dist-cli/chunks/control-PI6FRLTV.js +0 -2
- package/dist-cli/chunks/demo-app-registry-SDP4RWXB.js +0 -2
- package/dist-cli/chunks/drivers-BFET7Y5U.js +0 -2
- package/dist-cli/chunks/flow-JC7BTILV.js +0 -2
- package/dist-cli/chunks/install-AXZ4MKSG.js +0 -2
- package/dist-cli/chunks/record-36R7J2BU.js +0 -45
- package/dist-cli/chunks/runtime-L2E4XOOB.js +0 -2
- package/dist-cli/chunks/setup-repo-XGSB77UN.js +0 -2
- package/dist-cli/chunks/store-3LACO57B.js +0 -2
- package/dist-cli/chunks/telemetry-6QW73WDZ.js +0 -2
- package/dist-cli/chunks/upload-32RTWBK5.js +0 -2
package/dist-cli/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! sootsim v0.1.
|
|
3
|
-
import{a as l}from"./chunks/chunk-
|
|
2
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
|
+
import{a as l}from"./chunks/chunk-PXRELDJJ.js";import{a as A,b as k,c as S,d as L,e as u,f as T}from"./chunks/chunk-GKUKCZBA.js";import{a as d}from"./chunks/chunk-WN4XOOK5.js";import{a as v,d as _}from"./chunks/chunk-RRGCQNVD.js";import{a as E}from"./chunks/chunk-XHDHG6YH.js";import"./chunks/chunk-BT6IVKHN.js";import"./chunks/chunk-OBSMT5TS.js";import{z as C}from"./chunks/chunk-WKVIKFMU.js";import"./chunks/chunk-J6TCNU6W.js";function y(){let t=C();return`sootsim CLI v${E()} \xB7 runtime ${t?`v${t}`:"not installed"}`}function g(){let t=k({bridgePort:7668,defaultShellUrl:d},l()),e=`
|
|
4
4
|
${_}
|
|
5
5
|
`;console.log(`${y()}
|
|
6
6
|
${e}${t}
|
|
@@ -28,4 +28,4 @@ show the current shared desktop account used by the CLI and electron.
|
|
|
28
28
|
it needs vite / electron / playwright from a project's node_modules.
|
|
29
29
|
install the npm package and run via bun or node instead:
|
|
30
30
|
npm i -g sootsim && sootsim ${t}
|
|
31
|
-
`),process.exit(1))}var o=T(process.argv);{let{trackCliEvent:t}=await import("./chunks/telemetry-
|
|
31
|
+
`),process.exit(1))}var o=T(process.argv);{let{trackCliEvent:t}=await import("./chunks/telemetry-EZIRTFFL.js");t({event:"cli_command_invoked",properties:{command:o.command||(o.version?"version":o.help?"help":"none"),arg_count:o.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}async function c(t){let{flushCliTelemetry:e}=await import("./chunks/telemetry-EZIRTFFL.js");await e(),process.exit(t)}if(o.version){let{getCliVersion:t}=await import("./chunks/cli-version-32VNOX3F.js"),{IS_BETA:e,BETA_LABEL:i}=await import("./chunks/beta-YKR6YRXH.js"),m=e?` \xB7 ${i}`:"";console.log(`sootsim v${t()}${m}`);let{readActiveRuntime:I}=await import("./chunks/home-paths-KK7NZVIK.js"),b=I();console.log(b?`runtime v${b}`:"runtime not installed"),await c(0)}o.help&&!o.command&&(g(),await c(0));var a=o.globalFlags.port,n=o.verbose,p=o.globalFlags.device,f=o.globalFlags.theme,R=o.globalFlags.driver,q=o.globalFlags.headless===!0,O=o.globalFlags.sim,s=O?["--sim",O,...o.commandArgs]:o.commandArgs;if(p||f){let{settingsStore:t}=await import("./chunks/store-FRMH2SYG.js"),e={};p&&(e.deviceModel=p),f&&(e.colorScheme=f),t.apply(e)}if(!o.command&&o.commandArgs.length===0){let{runStart:t}=await import("./chunks/start-EBOUYGAP.js");await t([],{port:a}),await c(0)}var r=o.command??"";if(!r){if(o.commandArgs.length>0){let t=o.commandArgs.find(e=>!e.startsWith("-"))??o.commandArgs[0];console.error(` unknown command: ${t}`),console.error(" run `sootsim --help` to see the full surface."),await c(1)}g(),await c(0)}if(r in u){let t=u[r],e=o.commandArgs.length>0?` ${o.commandArgs.join(" ")}`:"";console.error(` \`sootsim ${r}\` was removed. use \`${t}\` instead.`),e&&console.error(` \u2192 ${t}${e}`),console.error(" run `sootsim --help` to see the new verb groups."),await c(1)}if(o.help||o.commandArgs.includes("--help")||o.commandArgs.includes("-h")){let t=r==="do"||r==="get"||r==="debug"||r==="shell"||r==="wait",e=o.commandArgs.find(i=>!i.startsWith("-"));r==="shell"||(t&&!e?$(r)&&await c(0):(h(t&&e?e:r),await c(0)))}N(r);if(L.has(r)){let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-PH4II3F2.js"),i=e(s,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-7AINMWI2.js");await m([r,...s],{port:i,verbose:n})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-X3GQJUDI.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-D6MKC5NH.js"),e=await t(s);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-SATSKLC6.js");await t(o.commandArgs,{port:a,verbose:n});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-VOWHHVNU.js");await t(o.commandArgs,{port:a,verbose:n});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-HNNW73KG.js"),e=await t(s,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"preview":{let{runPreview:t}=await import("./chunks/preview-EYIZWAEJ.js");await t(o.commandArgs,{port:a,verbose:n});break}case"record":{let{runRecord:t}=await import("./chunks/record-33ZECMTQ.js");await t(s,{port:a,verbose:n});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-UOG2ET7W.js"),e=await t(o.commandArgs,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"cpu-profile":{let{runCpuProfile:t}=await import("./chunks/cpu-profile-3C7LHLJE.js"),e=await t(s,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"react":{let{runReact:t}=await import("./chunks/react-MRICF5YD.js"),e=await t(s,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"screenshot":{let{runScreenshot:t}=await import("./chunks/screenshot-B6B3CE2W.js");await t(s,{port:a,verbose:n});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-GYQ3JHAW.js"),e=await t(s,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"screenshot-mode":{let{runScreenshotMode:t}=await import("./chunks/screenshot-mode-QVII6GH6.js");await t(o.commandArgs,{port:a,verbose:n});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-XLTSGRVJ.js");await t(o.commandArgs,{port:a,verbose:n});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-7AINMWI2.js");await t(s,{port:a,verbose:n});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-MNWVCAAF.js");await t(s,{port:a,verbose:n});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-ELOCAU3S.js");await t(s,{port:a,verbose:n});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-YGFJR2TI.js");await t(s,{port:a,verbose:n});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-J2BTJTGW.js"),e=await t(s,{port:a,verbose:n});process.exit(typeof e=="number"?e:0)}case"open":{let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-PH4II3F2.js"),i=e(s,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-GIAGLNPG.js");await m(s,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-GIAGLNPG.js");await t(s,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-GIAGLNPG.js");await t(s,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-GIAGLNPG.js");await t(s,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-JQF6TGCG.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-TFKPS72A.js");await t(s,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-SOHG4UE5.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-NHJHQAOJ.js");await t(o.commandArgs,{port:a,device:p,driver:R});break}case"login":{let{runLogin:t}=await import("./chunks/login-DCFVFSY3.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-55UH67FS.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-GKH3GF3H.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-PLJITE2X.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-2TQURG52.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-YPSDICK4.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-CRFW4MDL.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-G4WPXKFR.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-SD773LNY.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-OG4HGCYH.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-2OZLYETX.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-FHMTFUI3.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-EBOUYGAP.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-SHMN3LWB.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-ESDQSMYX.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-RF27H27Y.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-SJCUW6BT.js");await t(o.commandArgs,{port:a,verbose:n});break}case"hints":{let{runHints:t}=await import("./chunks/hints-XONGBPNI.js");t(o.commandArgs);break}default:console.error(` unknown command: ${r}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as y,b as $,c as b,d as l,e as E,g as A,h as j,j as S,m as I,n as T,o as x,p as g,q as k,r as D}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as y,b as $,c as b,d as l,e as E,g as A,h as j,j as S,m as I,n as T,o as x,p as g,q as k,r as D}from"./chunk-VE4QTDAY.js";import"./chunk-YXZFG3ZY.js";import"./chunk-OBSMT5TS.js";import"./chunk-WKVIKFMU.js";import"./chunk-J6TCNU6W.js";import w from"node:fs";import d from"node:path";import{spawn as N}from"node:child_process";import U from"node:net";import{WebSocket as O}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new O(`ws://localhost:${this.port}`),this.ready=new Promise((t,s)=>{let r=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",r),s(new c(`could not connect to sootsim daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",r),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==O.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let s=this.nextId++;return new Promise((r,o)=>{let i=setTimeout(()=>{this.pending.delete(s),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(s,{resolve:r,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:s,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(s),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let r of this.eventListeners)try{r({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let r of this.statusListeners)try{r(t.session)}catch{}return}if(typeof t.id!="number")return;let s=this.pending.get(t.id);s&&(this.pending.delete(t.id),clearTimeout(s.timer),t.error?s.reject(new c(t.error,t.code)):s.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function R(n=7668,e=400){return new Promise(t=>{let s=new U.Socket,r=!1,o=i=>{r||(r=!0,s.destroy(),t(i))};s.setTimeout(e),s.once("connect",()=>o(!0)),s.once("timeout",()=>o(!1)),s.once("error",()=>o(!1)),s.connect(n,"127.0.0.1")})}async function _(n={}){let e=n.port??7668;if(await R(e))return{alreadyRunning:!0};let{cmd:t,prefixArgs:s}=D(),r=[...s,"server","--quiet"];e!==7668&&r.push("--port",String(e));let o=N(t,r,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await R(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned sootsim daemon on port ${e} but it did not come up in time. run \`sootsim server\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await _({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ue(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return C(),0;case"attach":return await F(t);case"projects":return await B();case"project":return await W(t);case"sessions":return await J(t);case"start":return await V(t);case"prompt":return await q(t);case"watch":return await G(t);case"transcript":return await H(t);case"end":return await K(t);case"paths":return await z();default:return process.stderr.write(`unknown agent subcommand: ${e}
|
|
3
3
|
`),C(),2}}catch(s){if(s instanceof c)return process.stderr.write(`${s.message}
|
|
4
4
|
`),1;throw s}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function C(){process.stdout.write(`sootsim agent \u2014 attached projects + local agent sessions
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as M}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as M}from"./chunk-YXZFG3ZY.js";import"./chunk-J6TCNU6W.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as I,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,g=!1,a=new Promise(s=>{t.on("exit",(i,e)=>{g=!0;let p=new Error(`codex app-server exited (code=${i}, signal=${e??""})`);for(let{reject:f}of r.values())f(p);r.clear(),s({code:i,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let i=s.trim();if(!i)return;let e;try{e=JSON.parse(i)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,f=p!=null?r.get(p):void 0;if(!f)return;r.delete(p),e.error?f.reject(new b(e.error.message,e.error.code,e.error.data)):f.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let f of p)try{f(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let i=m.get("__stderr__");if(i)for(let e of i)try{e({text:s})}catch{}});function n(s){if(!g)try{t.stdin.write(JSON.stringify(s)+`
|
|
3
3
|
`)}catch{}}return{exited:a,on(s,i){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(i),()=>{e?.delete(i)}},request(s,i){if(g)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,f)=>{r.set(e,{resolve:l=>p(l),reject:f,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:i})})},notify(s,i){n({jsonrpc:"2.0",method:s,params:i})},async shutdown(s=1500){if(g)return;try{t.stdin.end()}catch{}let i=setTimeout(()=>{if(!g)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(i)}},kill(s="SIGTERM"){if(!g)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return I(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let g=t[u];g&&(r[g]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: sootsim agent-wrapper --session-id <id> --project-id <id>
|
|
4
4
|
--provider codex|claude --cwd <path>
|
|
5
5
|
--prompt-in <fifo> --events-out <fifo>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-J6TCNU6W.js";import{spawn as x}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=x(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
|
|
3
3
|
`).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=x("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
|
|
4
4
|
`),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
|
|
5
5
|
supported: ${Array.from(w).sort().join(", ")}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d}from"./chunk-N63QYSHT.js";import"./chunk-SVT7H2QF.js";import"./chunk-346HJVD6.js";import"./chunk-OBSMT5TS.js";import"./chunk-WKVIKFMU.js";import"./chunk-J6TCNU6W.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{l as P,n as a,y as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{l as P,n as a,y as m}from"./chunk-WKVIKFMU.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
|
|
3
3
|
`,"utf8"),l.renameSync(t,d()),r}function y(){return g(u()).profiles}function E(e){let r=o(e);return y().find(t=>t.id===r)??null}function _(e=s){let r=o(e),t=E(r);return t||D(r)}function D(e){let r=o(e),t=p(u());if(t.profiles.some(w=>w.id===r))throw new Error(`profile already exists: ${r}`);let f=new Date().toISOString(),n={id:r,createdAt:f,updatedAt:f};return g({version:i,profiles:[...t.profiles,n]}),n}function F(e){let r=o(e);if(r===s)throw new Error("the default profile cannot be deleted; clear it instead");let t=p(u()),f=t.profiles.find(n=>n.id===r);if(!f)throw new Error(`profile not found: ${r}`);return g({version:i,profiles:t.profiles.filter(n=>n.id!==r)}),v(r),f}function v(e){let r=o(e);for(let t of[h(r),A(r)])try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}export{A as a,y as b,_ as c,D as d,F as e,v as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as C,mkdirSync as D,readFileSync as O,rmSync as s,writeFileSync as g}from"fs";import{tmpdir as P}from"os";import{dirname as R,join as A,resolve as x}from"path";import{execFileSync as a}from"child_process";import{readFileSync as I}from"fs";import{createRequire as S}from"module";var o=null;function u(r){o||(o=_());try{return o(r)}catch{return null}}function _(){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=E();return n||T()}return()=>null}function y(){return r=>{try{let n=I(`/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,b=16;function E(){if(!process.versions?.bun)return null;try{let r=S(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 m=>{if(Number(i.symbols.proc_pidinfo(m,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(b);return p>0?p:null}}catch{return null}}function T(){return r=>{try{let t=a("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",v=["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 F(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 v){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=F(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 l(){if(process.env[f])return x(process.env[f]);let r=L();return A(P(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!C(r))return null;try{let n=JSON.parse(O(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 j(r){let n=r.trim();if(!n)return;let t=l();D(R(t),{recursive:!0}),g(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
4
4
|
`)}function K(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as Se}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as Se}from"./chunk-ZV2TI6OH.js";import{a as Te}from"./chunk-VGD57MTN.js";import{a as xe}from"./chunk-M4CADRP5.js";import{a as R,b as pe,c as fe,d as q,e as G,f as we,g as Y,i as X,j as ge}from"./chunk-YGMHOMAJ.js";import{f as be,m as ve}from"./chunk-LKJI7RRW.js";import{e as he}from"./chunk-RKUDWRIN.js";import{b as me}from"./chunk-T5TDH2UO.js";import{a as ye}from"./chunk-X3QWOTLT.js";import{a as le,b as H}from"./chunk-3R3BQDKC.js";import{f as ae}from"./chunk-BT6IVKHN.js";import{c as z,d as ce,e as ue}from"./chunk-SVT7H2QF.js";import{c as de}from"./chunk-346HJVD6.js";import*as A from"fs";import{tmpdir as Me}from"os";import*as h from"path";import*as w from"fs";import*as f from"path";var V=1e4,B=393,_=852,Fe="__sootsimCliPerf",Oe="maestroCopiedText",$e=new Map;function p(o){return new Promise(e=>setTimeout(e,o))}function Ne(o){return o?f.basename(o)===".maestro"?f.dirname(o):o:process.cwd()}function Re(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(f.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():Ne(t.flowDir);return f.resolve(i,r)}return f.join(o,r)}function Ve(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0}}function Q(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,s)=>i.endsWith("%")?Number.parseFloat(i)/100*s:Number.parseFloat(i);return{x:r(e,B),y:r(t,_)}}function Be(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=fe(pe.parse(t),$e);return Array.isArray(r)?r:[]}var U=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let s=e.find(a=>a.isPrimary&&a.readyState==="open"),n=e.find(a=>a.readyState==="open"),l=i??s??n;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=V){let t=Date.now()+e,r=Date.now(),i=null,s=0,n=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
|
|
3
3
|
const test = window.__sootsimTest
|
|
4
4
|
if (!test) return { count: 0, loading: true }
|
|
5
5
|
const count = (await test.getNodeCount?.()) || 0
|
|
@@ -340,7 +340,7 @@ flow extension:
|
|
|
340
340
|
+ completed (${M.length} steps)`),k&&ke(k),b&&console.log(` video: ${b}`),console.log()}catch(u){if(r&&!k)try{k=await c.stopProfile()}catch{}if(S&&!b)try{b=await c.stopRecording(),E=c.getLastRecordingDurationMs()}catch(d){console.warn(` recording stop failed: ${d?.message||String(d)}`)}console.error(`
|
|
341
341
|
x failed: ${u.message}
|
|
342
342
|
`),k&&(console.log(" partial profile:"),ke(k)),b&&console.log(` partial video: ${b}`);try{let d=c.lastFailedStep,v=d?`step-${String(d.index+1).padStart(2,"0")}-${d.kind}`:"unstaged",O=h.join(n,v);await c.captureFailureBundle(O,{error:u,stepIndex:d?.index,stepKind:d?.kind,stepTarget:d?.target}),console.log(` failure bundle: ${O}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(d){try{let v=h.join(n,"error.png");await c.captureFailureScreenshot(v),console.log(` error screenshot: ${v}`)}catch{}console.log(` (failure bundle capture failed: ${d instanceof Error?d.message:String(d)})`)}await me(F,{errorsCommand:`sootsim get errors 5${c.simId?` --sim ${c.simId}`:""}`,warningsCommand:`sootsim get warnings 5${c.simId?` --sim ${c.simId}`:""}`,requestsCommand:`sootsim get requests 5${c.simId?` --sim ${c.simId}`:""}`}),D=1}finally{F.close()}if(D===0&&y)try{let u=await We(J??[]),d=["--origin",W,"--events",u];Z&&d.push("--public-origin",Z),b&&d.push("--video",b),b&&E&&Number.isFinite(E)&&d.push("--video-duration-ms",String(Math.round(E))),c.simId&&d.push("--sim",c.simId),Ae&&d.push("--open"),console.log(`
|
|
343
|
-
preparing preview upload\u2026`);let{runUpload:v}=await import("./upload-
|
|
343
|
+
preparing preview upload\u2026`);let{runUpload:v}=await import("./upload-SJCUW6BT.js");await v(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),D=1}return await H(),D}async function We(o){let{gzipSync:e}=await import("zlib"),t=o.map(s=>JSON.stringify(s)).join(`
|
|
344
344
|
`)+(o.length?`
|
|
345
345
|
`:""),r=e(Buffer.from(t,"utf8")),i=h.join(Me(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(i,r),console.log(` events: ${o.length} written to ${i} (${r.length} bytes gz)`),i}async function Le(o){let e=o[0],t=r=>o.find((i,s)=>o[s-1]===r);switch(e){case"start":{let{path:r,state:i}=we();console.log(" flow draft started"),console.log(` session: ${r}`),console.log(` steps: ${i.steps.length}`);return}case"keep":case"good":{let r=X();if(r.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!r.kept){console.log(" no pending action to keep");return}console.log(` kept: ${r.candidate.summary}`),console.log(` steps: ${r.stepCount}`);return}case"end":{let r=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),i=o.includes("--validate")||o.includes("--video"),s=o.includes("--video"),n=X();n.active&&n.kept&&console.log(` auto-kept trailing action: ${n.candidate.summary}`);let l=ge(r||(i?Ke():void 0));if(l.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!l.valid){console.error(" flow draft is not valid:");for(let a of l.issues)console.error(` - ${a}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(i){let a=Je(o,l.outputPath),m=await Ie(a);if(m!==0){console.error(`
|
|
346
346
|
validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=m;return}Y(),console.log(` flow draft validated (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath&&console.log(` saved: ${l.outputPath}`),s&&console.log(" video: recorded during validation run");return}if(Y(),console.log(` flow draft ended (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath){console.log(` saved: ${l.outputPath}`),console.log(` next: sootsim flow ${l.outputPath} --record`);return}console.log(""),process.stdout.write(l.yaml);return}case"validate":{let r=o[1];(!r||r.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let i=G(r);if(i.length>0){console.error(` x ${r} failed validation:`);for(let s of i)console.error(` - ${s}`);process.exit(1)}console.log(` + ${r} looks valid`);return}}}function je(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function ut(o){let e=je(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await Le(e),0;let r=await Ie(e);return r!==0&&(process.exitCode=r),r}function ke(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-ALDKVFW3.js";import{w as o}from"./chunk-WKVIKFMU.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",()=>{i()}),process.on("exit",()=>{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,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P,b as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as v}from"./chunk-OBL6OIK5.js";import{d as j}from"./chunk-N63QYSHT.js";import{a as b}from"./chunk-3R3BQDKC.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,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{l as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{l as c}from"./chunk-WKVIKFMU.js";import{chmodSync as m,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as l,join as D,resolve as p}from"node:path";var s=1,S="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function v(){let t=process.env[S];return t?.trim()?l(p(t)):c()}function a(){let t=process.env[S];return t?.trim()?p(t):D(v(),"desktop-auth.json")}function f(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0}}function w(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:f(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=w(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function I(t){let e=a();k(l(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?f(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
3
3
|
`);try{m(e,384)}catch{}return r}function d(){i(a(),{force:!0})}async function N(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return d(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?I({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(d(),null)}catch{return e}}export{O as a,I as b,d as c,N as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},c={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},a=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:d},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:c},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:c}},u="iphone-17-pro";function b(e){return h[e]}function g(){return Object.keys(h)}var n={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},S="iphone-17-pro";function v(e){return Object.prototype.hasOwnProperty.call(n,e)?n[e]:null}function f(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(r=>({...r}))}}function B(e){return Object.prototype.hasOwnProperty.call(s,e)?f(s[e]):null}var p={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(n),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let r=new URLSearchParams(window.location.search),i=r.get("device");i&&p.deviceModel.options?.includes(i)&&(e.deviceModel=i);let l=r.get("colorScheme")??r.get("theme");l&&p.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function H(){let e={};for(let[r,i]of Object.entries(p))e[r]=i.default;return Object.assign(e,y()),e}export{P as a,S as b,v as c,f as d,B as e,h as f,b as g,g as h,p as i,y as j,H as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
async function
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
function T(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let s of n){let r=e.indexOf(s);if(r>=0&&e[r+1]){let i=Number(e[r+1]);if(Number.isFinite(i))return Math.max(100,i)}}return t}async function v(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function I(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function _(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function k(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
|
|
@@ -87,7 +87,7 @@ async function T(e){let t=await e.send({type:"evaluate",code:"(async () => await
|
|
|
87
87
|
return all
|
|
88
88
|
.filter(n => isVisibleTarget(n) && hasAccessibleSignal(n))
|
|
89
89
|
.map(normalize)
|
|
90
|
-
})()`;async function
|
|
90
|
+
})()`;async function L(e){let t=await e.send({type:"evaluate",code:y});return Array.isArray(t)?t:[]}var l=`
|
|
91
91
|
const fromInspectable = async () => {
|
|
92
92
|
if (typeof t.listInspectable !== 'function') return null
|
|
93
93
|
const list = await t.listInspectable({})
|
|
@@ -181,7 +181,7 @@ ${l}
|
|
|
181
181
|
})()`}:e.visible?{mode:"visible",code:`(async () => {
|
|
182
182
|
const all = await window.__sootsimTest.queryAll({ pruneHidden: true })
|
|
183
183
|
return all.filter(n => n.layout && n.layout.width > 0 && n.layout.height > 0)
|
|
184
|
-
})()`}:e.text?{mode:"text",code:`(async () => await window.__sootsimTest.findByText(${JSON.stringify(e.text)}))()`}:null}async function
|
|
184
|
+
})()`}:e.text?{mode:"text",code:`(async () => await window.__sootsimTest.findByText(${JSON.stringify(e.text)}))()`}:null}async function P(e,t){let n=p(t);if(!n)return null;let s=await e.send({type:"evaluate",code:n.code});return{mode:n.mode,result:s}}function A(e){return[...e].sort((t,n)=>c(n)-c(t))}function c(e){let t=0;e.testID&&(t+=100),typeof e.text=="string"&&e.text.trim().length>0&&(t+=60),typeof e.accessibilityLabel=="string"&&e.accessibilityLabel.trim().length>0&&(t+=30),e.accessibilityRole&&(t+=15);let n=e.layout?.width??0,s=e.layout?.height??0,r=n*s;return r>=400&&r<=6e4?t+=25:r>6e4&&(t-=20),(e.absolutePosition?.y??0)<0&&(t-=30),t}function D(e){if(e.testID)return`sootsim do tap-id ${u(e.testID)}`;let t=typeof e.text=="string"?e.text.trim():"";if(t.length>0&&t.length<=80)return`sootsim do tap-text ${u(t)}`;let n=Math.round(((e.absolutePosition?.x??0)+(e.layout?.width??0)/2)*10)/10,s=Math.round(((e.absolutePosition?.y??0)+(e.layout?.height??0)/2)*10)/10;return`sootsim do tap ${n} ${s}`}function u(e){return/^[A-Za-z0-9_./@:-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}var b=`(async () => {
|
|
185
185
|
const t = window.__sootsimTest
|
|
186
186
|
let nodes = 0
|
|
187
187
|
try { nodes = (await t?.getNodeCount?.()) || 0 } catch {}
|
|
@@ -239,7 +239,7 @@ ${l}
|
|
|
239
239
|
errors,
|
|
240
240
|
loadingText,
|
|
241
241
|
}
|
|
242
|
-
})()`,g=50,m=100,f=750;function w(e){return e.targets>0||e.nodes>=m}async function
|
|
242
|
+
})()`,g=50,m=100,f=750;function w(e){return e.targets>0||e.nodes>=m}async function R(e,t=2e4){let n=Date.now(),s=n+t,r=-1,i=n,o={flag:void 0,at:0,nodes:0,targets:0,errors:0,loadingText:""};for(;Date.now()<s;){try{o=await e.send({type:"evaluate",code:b})??o}catch{}let a=Date.now();if(o.nodes!==r&&(r=o.nodes,i=a),o.flag===!0&&!o.loadingText&&o.nodes>=g&&w(o)&&a-i>=f)return{ready:!0,elapsedMs:a-n,nodes:o.nodes,targets:o.targets,flag:o.flag,loadingText:o.loadingText,errors:o.errors};await new Promise(d=>setTimeout(d,150))}return{ready:!1,elapsedMs:Date.now()-n,nodes:o.nodes,targets:o.targets,flag:o.flag,loadingText:o.loadingText,errors:o.errors}}async function N(e,t,n=5e3){return await e.send({type:"evaluate",code:`(async () => {
|
|
243
243
|
const start = Date.now()
|
|
244
244
|
const deadline = start + ${n}
|
|
245
245
|
const t = window.__sootsimTest
|
|
@@ -258,17 +258,17 @@ ${l}
|
|
|
258
258
|
await new Promise((r) => setTimeout(r, 80))
|
|
259
259
|
}
|
|
260
260
|
return { found: false, elapsed: Date.now() - start }
|
|
261
|
-
})()`})??{found:!1,elapsed:n}}async function E(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function H(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function
|
|
261
|
+
})()`})??{found:!1,elapsed:n}}async function E(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function H(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function B(e){await e.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); "cleared"'})}async function C(e,t={}){let n=t.limit??20,s=t.failed===!1?"getRequests":"getFailedRequests",r=await e.send({type:"call",path:`__sootsimTest.${s}`,args:[n]});return Array.isArray(r)?r:[]}async function M(e){await e.send({type:"call",path:"__sootsimTest.clearRequests",args:[]})}async function $(e){let t=await e.send({type:"evaluate",code:`(() => {
|
|
262
262
|
const obs = window.__sootsimObservability;
|
|
263
263
|
if (!obs) return { ok: false };
|
|
264
264
|
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
265
|
-
})()`});if(!t||!t.ok)throw new Error("observability bridge not installed \u2014 is the engine running?");return t.entries??[]}async function
|
|
265
|
+
})()`});if(!t||!t.ok)throw new Error("observability bridge not installed \u2014 is the engine running?");return t.entries??[]}async function O(e){await e.send({type:"evaluate",code:'window.__sootsimObservability?.logs.clear(); "cleared"'})}function h(e,t){if(e.source===t.source||e.level!==t.level||Math.abs(e.ts-t.ts)>1e3||e.args.length!==t.args.length)return!1;let n=new Set([e.source,t.source]);return!n.has("sootsim-worker")||!n.has("render-worker")&&!n.has("forwarded-render-worker")?!1:e.args.every((s,r)=>s===t.args[r])}function F(e,t={}){let n=[];for(let s of e)n.some(r=>h(r,s))||n.push(s);if(t.showInternal||(n=n.filter(s=>{let r=s.args[0];return!(typeof r=="string"&&r.startsWith("[sootsim]"))})),t.level&&(n=n.filter(s=>t.level.has(s.level))),t.filter){let s=t.filter.toLowerCase();n=n.filter(r=>r.args.join(" ").toLowerCase().includes(s))}return n}async function W(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.summary",args:[t]})}async function z(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.recent",args:[t]})}async function K(e,t,n){await e.send({type:"call",path:"SootSim.bridges.timeline.cursorAdvance",args:[t,n]})}async function J(e){return await e.send({type:"evaluate",code:`(() => {
|
|
266
266
|
const kb = window.__sootsimKeyboard
|
|
267
267
|
if (!kb || typeof kb.getLayout !== 'function') {
|
|
268
268
|
return { error: 'keyboard bridge getLayout() not available' }
|
|
269
269
|
}
|
|
270
270
|
return kb.getLayout()
|
|
271
|
-
})()`})??{error:"keyboard bridge returned no result"}}function
|
|
271
|
+
})()`})??{error:"keyboard bridge returned no result"}}function x(e){let t=e instanceof Error?e.message:String(e);return t.includes("call target not found: SootSim.bridges.mainShell")||t.includes("test bridge unavailable before app-in-worker boot")}async function S(e,t=0){let n=Date.now()+Math.max(0,t);for(;;)try{return await e.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(s){if(!x(s)||Date.now()>=n)throw s;await new Promise(r=>setTimeout(r,50))}}async function V(e){let t=await e.send({type:"evaluate",code:`(async () => {
|
|
272
272
|
const test = window.__sootsimTest
|
|
273
273
|
const kb = window.__sootsimKeyboard
|
|
274
274
|
const navSnap =
|
|
@@ -292,7 +292,7 @@ ${l}
|
|
|
292
292
|
})()
|
|
293
293
|
: null
|
|
294
294
|
return { nav: navSnap, keyboard }
|
|
295
|
-
})()`});return{shell:await
|
|
295
|
+
})()`});return{shell:await S(e,500).catch(()=>null),nav:t?.nav??null,keyboard:t?.keyboard??null}}async function Q(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function j(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function Y(e,t){let n=t==="sheets"?"findSheets":"findPortals";return e.send({type:"evaluate",code:`window.__sootsimDebug.${n}()`})}async function q(e,t,n=50){let s=t&&t!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(t)}, ${n})`:`window.__sootsimDebug.recent(undefined, ${n})`;return e.send({type:"evaluate",code:s})}async function U(e,t,n){let s=n.length>0?n.map(r=>JSON.stringify(r)).join(", "):t==="disable"?"'all'":"";return e.send({type:"evaluate",code:`window.__sootsimDebug.${t}(${s})`})}async function G(e){return await e.send({type:"evaluate",code:`(async () => {
|
|
296
296
|
const host = window.__sootsimRenderHost
|
|
297
297
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
298
298
|
const hostMem = performance.memory
|
|
@@ -307,4 +307,4 @@ ${l}
|
|
|
307
307
|
workerHeap: stats?.memory?.workerHeap ?? null,
|
|
308
308
|
hostHeap: hostMem,
|
|
309
309
|
}
|
|
310
|
-
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function
|
|
310
|
+
})()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function X(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"],s=new Set;for(let r of n){let i=e.byKind[r];i&&(t.push(`${i} ${r}${i===1?"":"s"}`),s.add(r))}for(let[r,i]of Object.entries(e.byKind))!s.has(r)&&i&&t.push(`${i} ${r}${i===1?"":"s"}`);return t.join(" \xB7 ")}export{T as a,v as b,I as c,_ as d,k as e,L as f,P as g,A as h,D as i,b as j,g as k,f as l,w as m,R as n,N as o,E as p,H as q,B as r,C as s,M as t,$ as u,O as v,F as w,W as x,z as y,K as z,J as A,x as B,S as C,V as D,Q as E,j as F,Y as G,q as H,U as I,G as J,X as K};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as L}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as L}from"./chunk-J6TCNU6W.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`)}function ie(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
|
|
5
5
|
`,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{B as v,j as h,k as b,l as T,m as y}from"./chunk-DJIQVKM6.js";import{d as f,h as M,i as R}from"./chunk-SVT7H2QF.js";var B={timeoutMs:1800,settleMs:48,startWindowMs:64};function p(e){return new Promise(t=>setTimeout(t,e))}function k(e){return e.includes("--json")}function D(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
3
3
|
`)}async function I(e,t,...r){return M(e,`__sootsimTest.${t}`,...r)}async function x(e,t,...r){return R(e,`SootSim.bridges.mainShell.${t}`,...r)}async function _(e,t={}){try{let r=await I(e,"waitForScreenTransitions",B);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function P(e,t,r,...n){let i=Date.now()+Math.max(0,r);for(;;)try{return await x(e,t,...n)}catch(o){if(!v(o)||Date.now()>=i)throw o;await p(50)}}async function A(e,t,r,n={}){let i=n.attempts??30,o=n.intervalMs??500,d=n.minNodeCount??10;for(let s=0;s<i;s++){let u=f(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let a=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof a=="number"&&a>d)return{bridge:u,count:a}}catch{}u.close(),await p(o)}return null}async function E(e,t,r,n={}){let i=n.timeoutMs??8e3,o=n.intervalMs??250,d=Date.now()+i;for(;Date.now()<d;){let s=f(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await s.send({type:"evaluate",code:"1"}),s}catch{s.close()}await p(o)}return null}async function F(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,i=t.pollIntervalMs??200,o=Date.now(),d=o+r,s=-1,u=o,a={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,errors:0};for(;Date.now()<d;){try{let m=await e.send({type:"evaluate",code:h}),c=Date.now()-o,l=Number(m?.nodes)||0,w=Number(m?.targets)||0,g=Number(m?.errors)||0,S=m?.flag===!0;if(l!==s&&(s=l,u=c),a={ready:!1,source:"timeout",elapsedMs:c,nodes:l,targets:w,errors:g},S&&l>=b&&y({nodes:l,targets:w})&&c-u>=T)return{ready:!0,source:"flag",elapsedMs:c,nodes:l,targets:w,errors:g};if(c>=n&&g>0&&!S)return{ready:!1,source:"error-bail",elapsedMs:c,nodes:l,targets:w,errors:g}}catch{}await p(i)}return a.nodes>=b&&y(a)?{...a,ready:!0,source:"nodes-fallback"}:{...a,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}export{p as a,k as b,D as c,I as d,_ as e,P as f,A as g,E as h,F as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as i,e as d,h as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as i,e as d,h as c}from"./chunk-SVT7H2QF.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(t.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(o)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as w,i as u,j as m,k as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.64 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as w,i as u,j as m,k as l}from"./chunk-BT6IVKHN.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
|