sootsim 0.1.82 → 0.1.83
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-3C6Z6YXA.js → agent-MQ7GLVIB.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-7Z4UFACX.js → agent-wrapper-7KAFDQCN.js} +2 -2
- package/dist-cli/chunks/{assert-XYBIZRDK.js → assert-TV46GUNU.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-FQS4ZD2K.js +2 -0
- package/dist-cli/chunks/beta-VG7CDY2U.js +2 -0
- package/dist-cli/chunks/{chunk-BVXP2GDN.js → chunk-277XAALA.js} +3 -3
- package/dist-cli/chunks/{chunk-PYDAVGCZ.js → chunk-2AWQ7OB2.js} +1 -1
- package/dist-cli/chunks/chunk-2OIBDYHW.js +1 -0
- package/dist-cli/chunks/{chunk-2JQIKL3B.js → chunk-2PY3UZVO.js} +2 -2
- package/dist-cli/chunks/{chunk-EJGEDUOC.js → chunk-4LS5MZAI.js} +3 -3
- package/dist-cli/chunks/{chunk-GI5MF6LP.js → chunk-572VSFNP.js} +1 -1
- package/dist-cli/chunks/{chunk-QPDWMYCA.js → chunk-5DJXZIFZ.js} +1 -1
- package/dist-cli/chunks/chunk-6BNLVMXA.js +1 -0
- package/dist-cli/chunks/{chunk-EX6IOT23.js → chunk-6NN2D4EJ.js} +2 -2
- package/dist-cli/chunks/{chunk-C7JOLDDQ.js → chunk-6TNANCQC.js} +2 -2
- package/dist-cli/chunks/chunk-6XD6CBJM.js +2 -0
- package/dist-cli/chunks/{chunk-IZ2OO47Y.js → chunk-6XZOEBTZ.js} +2 -2
- package/dist-cli/chunks/chunk-CHQTO426.js +1 -0
- package/dist-cli/chunks/{chunk-JVNGH5S7.js → chunk-CJY3AVI7.js} +1 -1
- package/dist-cli/chunks/{chunk-MQXYJTXM.js → chunk-CYV6Y6YV.js} +2 -2
- package/dist-cli/chunks/{chunk-QTJJHBCI.js → chunk-DM6WT7QM.js} +1 -1
- package/dist-cli/chunks/{chunk-Z6G5SDG7.js → chunk-DP7O5MHK.js} +2 -2
- package/dist-cli/chunks/{chunk-PO64TMRT.js → chunk-ECJBV65H.js} +2 -2
- package/dist-cli/chunks/{chunk-H6NBDJIO.js → chunk-F3HP444U.js} +1 -1
- package/dist-cli/chunks/{chunk-27HBWBE6.js → chunk-FAPYGVIU.js} +2 -2
- package/dist-cli/chunks/{chunk-2EFQQWEC.js → chunk-FJYT7XL2.js} +2 -2
- package/dist-cli/chunks/{chunk-BISEHRNE.js → chunk-FRM355UL.js} +2 -2
- package/dist-cli/chunks/{chunk-U3XCDQRH.js → chunk-HAWOAQAG.js} +3 -3
- package/dist-cli/chunks/{chunk-UOWBKSSI.js → chunk-HNWEELAE.js} +1 -1
- package/dist-cli/chunks/{chunk-DSYW2NOW.js → chunk-IBNRRAES.js} +2 -2
- package/dist-cli/chunks/{chunk-JUDJXJSE.js → chunk-IP3QJLRH.js} +1 -1
- package/dist-cli/chunks/{chunk-4QUAOBUB.js → chunk-J2GYISVJ.js} +2 -2
- package/dist-cli/chunks/{chunk-ZN2C7V5R.js → chunk-JHJNODXN.js} +2 -2
- package/dist-cli/chunks/{chunk-JUCV3VHM.js → chunk-JQ7ZXOXJ.js} +2 -2
- package/dist-cli/chunks/{chunk-7SCQEPXK.js → chunk-KASUZ5XV.js} +1 -1
- package/dist-cli/chunks/{chunk-Q4JNA5VO.js → chunk-NXATOWWF.js} +1 -1
- package/dist-cli/chunks/{chunk-WZLKUS54.js → chunk-OYMFNU3M.js} +1 -1
- package/dist-cli/chunks/{chunk-2W5C5J4O.js → chunk-PEHFE3LG.js} +2 -2
- package/dist-cli/chunks/{chunk-DCFGNIJC.js → chunk-PM5NVKLP.js} +2 -2
- package/dist-cli/chunks/{chunk-TR7NIFSL.js → chunk-RH4F2TF7.js} +1 -1
- package/dist-cli/chunks/chunk-RXH2SLKF.js +2 -0
- package/dist-cli/chunks/chunk-UXQWC5ZR.js +79 -0
- package/dist-cli/chunks/{chunk-D3SM2JYB.js → chunk-VMXWC2JO.js} +2 -2
- package/dist-cli/chunks/{chunk-M3OULYY3.js → chunk-WN7M3QON.js} +2 -2
- package/dist-cli/chunks/{chunk-M4ERVRM4.js → chunk-WTKTOL3C.js} +2 -2
- package/dist-cli/chunks/{chunk-7YLCK5HG.js → chunk-XFQL74PF.js} +2 -2
- package/dist-cli/chunks/chunk-Y2VJBRSP.js +119 -0
- package/dist-cli/chunks/{chunk-2XULSYS6.js → chunk-Y4BUVURT.js} +2 -2
- package/dist-cli/chunks/{chunk-O3AOQP3V.js → chunk-YUELRHGB.js} +2 -2
- package/dist-cli/chunks/cli-version-PWF6I6LY.js +2 -0
- package/dist-cli/chunks/{compat-2DVSCCR7.js → compat-QLLWBTS3.js} +3 -3
- package/dist-cli/chunks/{config-YDX4Q4XM.js → config-2DSLDCXV.js} +2 -2
- package/dist-cli/chunks/{control-EAK2OPGB.js → control-UIOXGYXU.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-GU62WVZZ.js → cpu-profile-GEIKHCPC.js} +2 -2
- package/dist-cli/chunks/{daemon-V5NLDTSB.js → daemon-4EBUFN4D.js} +2 -2
- package/dist-cli/chunks/{debug-HAOCONNB.js → debug-WGD6XWOF.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-G3BDOFWC.js +2 -0
- package/dist-cli/chunks/{detox-YLC4DLXB.js → detox-LNKGRZU6.js} +2 -2
- package/dist-cli/chunks/{device-ZQ4DN4H6.js → device-AYKXKVIQ.js} +2 -2
- package/dist-cli/chunks/{diagnose-HNUO3Z5F.js → diagnose-TMXSDOOC.js} +2 -2
- package/dist-cli/chunks/drivers-IDQF34HP.js +2 -0
- package/dist-cli/chunks/{electron-ZAASAHSW.js → electron-QFPF7TBY.js} +3 -3
- package/dist-cli/chunks/flow-3JN3Y7RF.js +2 -0
- package/dist-cli/chunks/{hints-BA3GE5W5.js → hints-MXKRR4TG.js} +2 -2
- package/dist-cli/chunks/{home-paths-MQXRHBTW.js → home-paths-REMWQDAO.js} +2 -2
- package/dist-cli/chunks/{inspect-T4RMS5KX.js → inspect-XGSQNFV7.js} +3 -3
- package/dist-cli/chunks/install-2N3YOOSN.js +2 -0
- package/dist-cli/chunks/{install-desktop-MH26VONS.js → install-desktop-NQG3RZSA.js} +3 -3
- package/dist-cli/chunks/{keys-IELIDRGB.js → keys-5QZWXL3F.js} +2 -2
- package/dist-cli/chunks/{launch-VMT3OWOB.js → launch-SBXOZWKO.js} +3 -3
- package/dist-cli/chunks/{login-VZBANVLU.js → login-EACQXE24.js} +4 -4
- package/dist-cli/chunks/{logout-GWXBTQ4H.js → logout-IBQLMUML.js} +2 -2
- package/dist-cli/chunks/{maestro-JYHR4HFR.js → maestro-LFYXUX7O.js} +2 -2
- package/dist-cli/chunks/{preview-RPZ4UQ2B.js → preview-U4SBOEGQ.js} +2 -2
- package/dist-cli/chunks/{profile-7FLDF2AP.js → profile-GWS5ECMY.js} +2 -2
- package/dist-cli/chunks/{react-3RC4CNDZ.js → react-QDHLMVYL.js} +2 -2
- package/dist-cli/chunks/record-BUEUWPDI.js +70 -0
- package/dist-cli/chunks/runtime-PVB4VGUH.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-Z7I2KIRB.js → runtime-delivery-G7L6RVZ7.js} +2 -2
- package/dist-cli/chunks/{screenshot-GRCZ6AM4.js → screenshot-T2HBA3VI.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-E4YHXHH5.js → screenshot-mode-EG5HMIH3.js} +2 -2
- package/dist-cli/chunks/{screenshots-7SXMX2AY.js → screenshots-S52AFHTV.js} +2 -2
- package/dist-cli/chunks/{server-GDJ2TCRV.js → server-MFFVYUGG.js} +2 -2
- package/dist-cli/chunks/setup-repo-YOF7NV5D.js +2 -0
- package/dist-cli/chunks/{skills-62E7NDRC.js → skills-HQGWBS2O.js} +2 -2
- package/dist-cli/chunks/{start-Y7KR5ZQ3.js → start-E3DRYY7W.js} +4 -4
- package/dist-cli/chunks/store-MAI6D3UO.js +2 -0
- package/dist-cli/chunks/telemetry-RCQKCJTH.js +2 -0
- package/dist-cli/chunks/{test-IYMSUPVC.js → test-ZY3EF62K.js} +3 -3
- package/dist-cli/chunks/{three-mode-QKKXCCC2.js → three-mode-WSPKQCJ5.js} +2 -2
- package/dist-cli/chunks/{timeline-PF6NQ7RT.js → timeline-3XAB5EWZ.js} +2 -2
- package/dist-cli/chunks/{upgrade-CE2Y3TAN.js → upgrade-WNENPFM5.js} +2 -2
- package/dist-cli/chunks/upload-YLJ4RA73.js +2 -0
- package/dist-cli/chunks/{web-XEO3ZCPF.js → web-D2AOZY44.js} +2 -2
- package/dist-cli/chunks/{what-happened-372J7YF7.js → what-happened-F43KNSG6.js} +2 -2
- package/dist-cli/chunks/{whoami-B4E7KCT5.js → whoami-T22VBR7C.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-D2EQVL7R.js +0 -2
- package/dist-cli/chunks/beta-VHPXECZY.js +0 -2
- package/dist-cli/chunks/chunk-3OH4VCJA.js +0 -1
- package/dist-cli/chunks/chunk-45HLFQRI.js +0 -2
- package/dist-cli/chunks/chunk-BRDUKIZI.js +0 -119
- package/dist-cli/chunks/chunk-GADW2Q5S.js +0 -1
- package/dist-cli/chunks/chunk-HST43CVE.js +0 -2
- package/dist-cli/chunks/chunk-QJBQOGTK.js +0 -73
- package/dist-cli/chunks/chunk-V26REV7G.js +0 -1
- package/dist-cli/chunks/cli-version-WF7T6IKI.js +0 -2
- package/dist-cli/chunks/demo-app-registry-52A2MI72.js +0 -2
- package/dist-cli/chunks/drivers-B4QPIZ4B.js +0 -2
- package/dist-cli/chunks/flow-PFLHFNVM.js +0 -2
- package/dist-cli/chunks/install-ZCPEMK6U.js +0 -2
- package/dist-cli/chunks/record-CZ33G5FT.js +0 -70
- package/dist-cli/chunks/runtime-AZKHZHJ4.js +0 -2
- package/dist-cli/chunks/setup-repo-3Y2QAZRK.js +0 -2
- package/dist-cli/chunks/store-TDTFZMGA.js +0 -2
- package/dist-cli/chunks/telemetry-G3NIU5NP.js +0 -2
- package/dist-cli/chunks/upload-CLWFS7IL.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-F3HP444U.js";import"./chunk-2OIBDYHW.js";import{a as v,f as h}from"./chunk-JHJNODXN.js";import"./chunk-XFQL74PF.js";import"./chunk-IBNRRAES.js";import"./chunk-RH4F2TF7.js";import"./chunk-PEHFE3LG.js";import{b as f,g as u}from"./chunk-CYV6Y6YV.js";import{a as p}from"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import{c as m}from"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import"./chunk-RXH2SLKF.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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-NQG3RZSA.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-277XAALA.js";import"./chunk-FRM355UL.js";import"./chunk-6BNLVMXA.js";import"./chunk-Y4BUVURT.js";import"./chunk-UXQWC5ZR.js";import"./chunk-DP7O5MHK.js";import{d as a,e as b}from"./chunk-6XZOEBTZ.js";import"./chunk-JHJNODXN.js";import"./chunk-XFQL74PF.js";import"./chunk-IBNRRAES.js";import"./chunk-RH4F2TF7.js";import"./chunk-PEHFE3LG.js";import"./chunk-CYV6Y6YV.js";import"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import"./chunk-ECJBV65H.js";import"./chunk-RXH2SLKF.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-WN7M3QON.js";import"./chunk-NXATOWWF.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-6TNANCQC.js";import"./chunk-HNWEELAE.js";import"./chunk-OYMFNU3M.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.83 | (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-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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 Q}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as Q}from"./chunk-6TNANCQC.js";import{a as pt,b as ft}from"./chunk-DM6WT7QM.js";import{a as He,h as ye,k as ee}from"./chunk-6XZOEBTZ.js";import{b as gt,c as yt,i as ht}from"./chunk-JHJNODXN.js";import"./chunk-XFQL74PF.js";import{a as Z,b as j,c as J,d as ne,e as V,f as ge,g as de,h as dt,i as ut,j as _e,k as mt}from"./chunk-IBNRRAES.js";import{B as at,D as le,E as lt,K as ct,a as fe,b as Ue,c as Ke,d as ze,e as Ye,f as Ge,g as Xe,h as Me,i as Ie,n as Ne,o as Ve,p as Qe,q as Ze,r as et,s as tt,t as ot,u as st,v as nt,w as rt,x as it}from"./chunk-RH4F2TF7.js";import"./chunk-PEHFE3LG.js";import"./chunk-CYV6Y6YV.js";import"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import{a as Be}from"./chunk-IP3QJLRH.js";import{a as Se,c as ke}from"./chunk-Y2VJBRSP.js";import{a as De}from"./chunk-RXH2SLKF.js";import{c as Je,e as Le,f as qe,g as We,h as Te}from"./chunk-YUELRHGB.js";import{b as je}from"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";import{existsSync as eo,mkdirSync as to,readFileSync as oo,rmSync as bt,writeFileSync as so}from"fs";import{tmpdir as no}from"os";import{dirname as ro,join as io,resolve as ao}from"path";var ue=1,lo="SOOTSIM_INSPECT_NOTICE_PATH",co=300*1e3,uo=15e3;function wt(){return ao(process.env[lo]||io(no(),"sootsim-inspect-notice-state.json"))}function mo(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=co))}function po(o){let c=wt();if(!eo(c))return{version:ue,entries:{}};try{let i=JSON.parse(oo(c,"utf8"));return i.version!==ue||!i.entries||typeof i.entries!="object"?(bt(c,{force:!0}),{version:ue,entries:{}}):{version:ue,entries:mo(i.entries,o)}}catch{return bt(c,{force:!0}),{version:ue,entries:{}}}}function fo(o){let c=wt();to(ro(c),{recursive:!0}),so(c,JSON.stringify(o,null,2)+`
|
|
3
3
|
`)}function go(o,c){let i=c.trim()||"default";return`${o}:${i}`}function Fe(o,c,i,l={}){let f=l.nowMs??Date.now(),a=l.cooldownMs??uo,g=po(f),h=go(o,c),M=g.entries[h];return M&&M.signature===i&&f-M.updatedAt<a?!1:(g.entries[h]={signature:i,updatedAt:f},fo(g),!0)}async function xt(o,c={args:[]}){let i=await Ue(o);if(j(c.args)){J(i);return}console.log(` nodes: ${i.nodes}`)}function Ae(o,c){let i=o.indexOf(c);return i>=0&&i+1<o.length?o[i+1]:null}async function $t(o){let{bridge:c,args:i,positional:l}=o,f=i.includes("--verbose")||i.includes("-v"),a=j(i),g=f&&!a,h=i.includes("--watch")||i.includes("-w"),M=1e3,k=i.includes("--compact"),w=i.includes("--no-xy"),S=i.includes("--no-clipped"),I=Ae(i,"--testid-like"),N=Ae(i,"--only"),O=Ae(i,"--subtree"),D=l[1],u=D?/[*?]/.test(D):!1,H=!u&&!N?D:void 0,B=N??(u?D:void 0),C=async()=>{await ge(c,{verbose:g});let Y=await Ye(c,{describe:!0,verbose:f,filter:H||"",testIdLike:I||void 0,onlyGlob:B||void 0,subtreeRoot:O||void 0,compact:k,hideXy:w}),$=Y?.tree,T=Y?.shell,q=Y?.keyboard;if(a){J({shell:T,tree:$??"",keyboard:q});return}if(T&&typeof T=="object"){let E=[T.state?`state=${T.state}`:null,T.activeApp?`app=${T.activeApp}`:null,T.showSwitcher?"switcher":null,T.switcherPhase&&T.switcherPhase!=="idle"?`phase=${T.switcherPhase}`:null].filter(Boolean);E.length>0&&console.log(` shell: ${E.join(" ")}`)}if(typeof $=="string"&&$.startsWith("__SUBTREE_NOT_FOUND__:")){let E=$.slice(22);console.log(` subtree root not found: ${E}`),Q("subtree-root-not-found",E);return}if(!$){let E=Y?.nodeCount??0;console.log(" no matching nodes found"),!(H||I||B||O)&&E<10&&Q("app-still-loading",E);return}let z=$,G=0;if(S&&typeof z=="string"){let E=z.split(`
|
|
4
4
|
`),se=[];for(let pe of E){if(pe.includes("(clipped:")){G+=1;continue}se.push(pe)}z=se.join(`
|
|
5
5
|
`)}console.log(z),G>0&&console.log(` ${G} clipped row(s) hidden (omit --no-clipped to see)`);let re=H||I||B||O;if((H||I||B)&&!h&&Q("describe-filter-context"),!re&&!h&&$.split(`
|
|
@@ -114,7 +114,7 @@ import{a as Q}from"./chunk-C7JOLDDQ.js";import{a as pt,b as ft}from"./chunk-QTJJ
|
|
|
114
114
|
`);console.log(`${t??""}
|
|
115
115
|
|
|
116
116
|
${n}
|
|
117
|
-
`),process.exit(0)}let I=f.wsPort,N=f.simId,O=f.simIdSource,D=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-
|
|
117
|
+
`),process.exit(0)}let I=f.wsPort,N=f.simId,O=f.simIdSource,D=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-IDQF34HP.js"),t=e();console.log(` available drivers (${t.length}):
|
|
118
118
|
`);let n=Math.max(...t.map(s=>s.id.length),6),r=Math.max(...t.map(s=>s.kind.length),4);for(let s of t){let d=s.available?"\u2713":"\u2717",m=s.id.padEnd(n),y=s.kind.padEnd(r);console.log(` ${d} ${m} ${y} ${s.description}`),s.available&&s.detail?console.log(` ${s.detail}`):!s.available&&s.reason&&console.log(` unavailable: ${s.reason}`)}return}let u=Le(f),H=N||"default",B=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),C=200;function oe(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(e)?.[1]?.trim(),s=/<body[^>]*>([\s\S]*?)<\//i.exec(e)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||s||"html error page";return`<html ${e.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=C?t:`${t.slice(0,C)}\u2026 (+${t.length-C} more bytes)`}function Y(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function $(e){let t=he()?5e3:1500;try{let{settled:n,elapsed:r}=await ee({bridge:e,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
119
119
|
`)}catch{}}function T(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function q(e,t){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??t??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function z(e){let t=0,n=null,r=null;try{await ee({bridge:u,maxMs:he()?3e3:1200,pollMs:32,stablePolls:2})}catch{}let s=Date.now()+(he()?5e3:2500);for(;Date.now()<=s||t===0;){t++;let d=await e.resolve();if(n=d,d?.error==="bridge-not-ready"||d?.ambiguous||d?.nthOutOfRange)return{payload:d,result:null,attempts:t,failure:"special"};if(d&&typeof d.cx=="number"&&typeof d.cy=="number"){let y=await u.send({type:"tap",x:d.cx,y:d.cy,target:q(d,e.textFallback)});if(r=y,T(y))return{payload:d,result:y,attempts:t}}let m=s-Date.now();if(m<=0)break;try{await ee({bridge:u,maxMs:Math.min(m,700),pollMs:32,stablePolls:2})}catch{await Z(Math.min(120,m))}}return{payload:n,result:r,attempts:t,failure:n&&typeof n.cx=="number"?"missed":"not-found"}}function G(e,t){console.error(` tap failed: ${e} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function re(){try{return await u.send({type:"evaluate",code:`(() => ({
|
|
120
120
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-J2GYISVJ.js";import"./chunk-F3HP444U.js";import"./chunk-4LS5MZAI.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-F3HP444U.js";import{a as x}from"./chunk-6NN2D4EJ.js";import"./chunk-OYMFNU3M.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as k}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function _({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(A(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,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function I(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/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}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
|
|
3
3
|
`),t=e[e.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=k(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]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=k(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function G(n){(n.includes("--help")||n.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=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=x();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();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(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await _({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${r instanceof Error?r.message:String(r)}`),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-RCQKCJTH.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),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{G 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.83 | (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-DP7O5MHK.js";import{d as c}from"./chunk-2PY3UZVO.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-2OIBDYHW.js";import{b as m}from"./chunk-CYV6Y6YV.js";import{a as u}from"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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-PVB4VGUH.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 g,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as g,d as m}from"./chunk-2PY3UZVO.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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(r){if(r)return r;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 L(){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">${r}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe")}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe")}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-RCQKCJTH.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(o=>{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,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({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`.")),o({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"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),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
|
-
`),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-RCQKCJTH.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-RCQKCJTH.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-VMXWC2JO.js";import{a as t,c as o}from"./chunk-2PY3UZVO.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as h,c as w}from"./chunk-277XAALA.js";import"./chunk-FRM355UL.js";import"./chunk-6BNLVMXA.js";import"./chunk-Y4BUVURT.js";import"./chunk-UXQWC5ZR.js";import"./chunk-DP7O5MHK.js";import"./chunk-6XZOEBTZ.js";import"./chunk-JHJNODXN.js";import"./chunk-XFQL74PF.js";import"./chunk-IBNRRAES.js";import"./chunk-RH4F2TF7.js";import"./chunk-PEHFE3LG.js";import"./chunk-CYV6Y6YV.js";import"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import"./chunk-ECJBV65H.js";import"./chunk-RXH2SLKF.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-WN7M3QON.js";import"./chunk-NXATOWWF.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-OYMFNU3M.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.83 | (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-FJYT7XL2.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as w,e as b,h as m,i as f}from"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";function h(){console.log(`
|
|
3
3
|
sootsim react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as N}from"./chunk-Y4BUVURT.js";import"./chunk-UXQWC5ZR.js";import{d as Y,f as Z}from"./chunk-DP7O5MHK.js";import"./chunk-CHQTO426.js";import{d as K}from"./chunk-5DJXZIFZ.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import{c as b,e as v,f as Q}from"./chunk-YUELRHGB.js";import{b as X}from"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";import{existsSync as we,mkdirSync as B,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as C}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as D,extname as oe,join as A,resolve as Se}from"path";var ee=24e4,$e=3e4;async function W(e,r,o,i){let t=Math.max(2e4,i+$e);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
|
+
the capture lock auto-releases, so simply retry the recording.
|
|
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
|
+
a prior recording was abandoned and its capture is still
|
|
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 Re=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),xe=new Set(["start","stop","cancel","status","prelude-start"]);function _e(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){Re.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function re(e){let r=l(e,"--owner")?.trim(),o=l(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),r&&o?{owner:r,repo:o}:null}async function Ge(e,r){let o=_e(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ue(d,r);return}if(o.name==="prelude-start"){await Ie(d,r);return}if(o.name==="stop"){await Te(d,r);return}if(o.name==="cancel"){await Fe(d,r);return}await Ae(d,r);return}let i=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),t=ie(l(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=l(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=l(e,"--output"),a=Number(l(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let m=1800;a>m&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 exceeds the ${m}s (30m) maximum`),process.exit(1));let u=Number(l(e,"--fps")??"30"),p=l(e,"--frames");if(p!==void 0){let d=Number(p);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),process.exit(1))}let _=e.includes("--open"),H=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,g=Math.max(100,Math.round(a*1e3)),q=l(e,"--origin"),pe=re(e);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 N("record",{originOverride:q,allowGitHubAuth:!0});let d=v({...i,commandTimeoutMs:6e4});try{await j(d),await ae(d,t),t==="combined"&&await E(d),await de(d,q,pe);let R=await ce(d,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 ${a}s`),await new Promise(x=>setTimeout(x,g)),await le(d);let k=await ue(d);me(k,_,t)}finally{d.close()}return}let F=p?Number(p):null,S=Be(s,c,F);_&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let h=v({...i,commandTimeoutMs:6e4});try{if(await te(h),await E(h),S==="png"){let $=F??10,w=I(c,`sootsim-frames-${U()}`);c&&oe(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),B(w,{recursive:!0});for(let f of he(w))/^frame-\d+\.png$/.test(f)&&J(A(w,f),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${w}`);let y=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${g}${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(f=>setTimeout(f,g));let fe=Date.now()+Math.max(5e3,g),T=null;for(;;){let f=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${y.requestId})`});if(f||(console.error(" frame capture result missing"),process.exit(1)),f.done){f.ok||(console.error(` frame capture failed: ${f.error??"unknown error"}`),process.exit(1)),T=f.frames??[];break}Date.now()>=fe&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(P=>setTimeout(P,100))}T.forEach((f,P)=>{let ge=`${w}/frame-${String(P+1).padStart(3,"0")}.png`;C(ge,Buffer.from(f.data,"base64"))}),console.log(` saved ${T.length} frames`);return}if(S==="gif"){let $=F??Math.max(10,Math.round(a*u/3)),w=I(c,`sootsim-${U()}.gif`);B(D(w),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${w}`);let y=await W(h,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${g}${H?`, maxWidth: ${H}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",g);y||(console.error(" gif capture returned no frames"),process.exit(1)),C(w,Buffer.from(y.data,"base64")),console.log(` saved: ${w} (${z(y.size)})`);return}let d=I(c,`sootsim-${U()}.${S}`);B(D(d),{recursive:!0});let R={format:S,fps:u,durationMs:g};n&&(R.layers=n);let k=await W(h,`window.__sootsimRecorder.start(${JSON.stringify(R)})`,`${S} start`,g);k.ok||(console.error(` start failed: ${k.error??"unknown error"}`),/render host not available|already streaming|already recording/i.test(k.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 ${S} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,g));let x=await W(h,"window.__sootsimRecorder.stop()",`${S} encode/flush`,g);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 ne(h,d),console.log(` saved: ${d} (${z(x.size)})`)}finally{h.close()}}var ke=6e3;async function L(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:ke})}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 te(e){await L(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function E(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
|
|
8
|
+
would be throttled to ~1fps and produce a frozen-looking file.
|
|
9
|
+
bring the chrome window to the foreground (un-minimize / switch to
|
|
10
|
+
its tab) or run the recording in headless playwright, then retry.`),process.exit(1))}async function ne(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}C(r,Buffer.concat(o))}function l(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Oe(e){if(!e)return;let r=oe(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Be(e,r,o){return e||(o!=null?"png":Oe(r)??"webm")}function U(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function Ee(){let e=A(ve(),".sootsim","recordings");return B(e,{recursive:!0}),e}function I(e,r){return e?Se(process.cwd(),e):A(Ee(),r)}function z(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function ie(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 V(){return A(ye(),`sootsim-recording-${X()}.json`)}function M(){let e=V();if(!we(e))return null;try{return{mode:"video",...JSON.parse(be(e,"utf8"))}}catch{return J(e,{force:!0}),null}}function Me(e){C(V(),JSON.stringify(e,null,2))}function O(){J(V(),{force:!0})}function G(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
|
|
11
|
+
requested sim ${e}. record state is global (not per-sim);
|
|
12
|
+
this command acts on that session regardless of --sim.`)}async function Ue(e,r){let o=M();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=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin","--owner","--repo"]}),t=ie(l(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=l(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 a=Number(l(e,"--fps")??"30"),m=re(e),u=v({...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 N("record",{originOverride:l(e,"--origin"),allowGitHubAuth:!0}),await j(u),await ae(u,t),t==="combined"&&await E(u),await de(u,l(e,"--origin"),m);let p=await ce(u,t,t==="combined"?n:void 0);p.ok||(console.error(` start failed: recording store refused to start (${t})`+(p.error?`: ${p.error}`:"")),process.exit(1))}else{await te(u),await E(u);let p={format:c,fps:a};n&&(p.layers=n);let _=await u.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(p)})`});_.ok||(console.error(` start failed: ${_.error??"unknown error"}`),process.exit(1))}Me({simId:i.simId??null,mode:t,format:c,fps:a,layers:n,startedAt:new Date().toISOString()}),console.log(t==="video"?` recording ${c} @ ${a}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{u.close()}}async function Ie(e,r){let o=M();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=b(e,{port:r.port,stripBooleanFlags:[],stripValueFlags:["--origin"]}),t=v({...i,commandTimeoutMs:15e3});try{if(await j(t),await E(t),!await t.send({type:"evaluate",code:`(() => {
|
|
13
|
+
const start = window.SootSim?.bridges?.startRecordingPrelude
|
|
14
|
+
if (typeof start !== 'function') return false
|
|
15
|
+
return Promise.resolve(start()).then((value) => value === true)
|
|
16
|
+
})()`})){let s=await t.send({type:"evaluate",code:`(() => {
|
|
17
|
+
const getError = window.SootSim?.bridges?.getRecordingStartError
|
|
18
|
+
return typeof getError === 'function' ? getError() : null
|
|
19
|
+
})()`}).catch(()=>null);console.error(` prelude start failed: recording store refused to start${typeof s=="string"&&s?` (${s})`:""}`),process.exit(1)}console.log(" recording preview prelude \u2014 run `sootsim record start --mode combined` when the visible proof segment is ready")}finally{t.close()}}async function se(e){try{let r=await e.send({type:"evaluate",code:`(() => {
|
|
20
|
+
const store = window.SootSim?.bridges?.getRecordingState?.();
|
|
21
|
+
const headless = window.__sootsimRecorder?.state?.();
|
|
22
|
+
const eventRecorder = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder;
|
|
23
|
+
const eventRecording =
|
|
24
|
+
typeof eventRecorder?.isRecording === 'function'
|
|
25
|
+
? eventRecorder.isRecording() === true
|
|
26
|
+
: false;
|
|
27
|
+
return { store: store ? store.state : undefined, headless, eventRecording };
|
|
28
|
+
})()`});return r?r.store==="recording"||r.headless==="recording"?"recording":r.store==="processing"?"processing":r.eventRecording?"prelude":r.store==="idle"||r.headless==="idle"?"idle":null:null}catch{return null}}async function Ce(e){let r=await e.send({type:"evaluate",code:`(() => {
|
|
29
|
+
const store = window.SootSim?.bridges?.getRecordingState?.();
|
|
30
|
+
const eventRecorder = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder;
|
|
31
|
+
const hadStoreRecording = store && store.state !== 'idle';
|
|
32
|
+
const hadEventRecording =
|
|
33
|
+
typeof eventRecorder?.isRecording === 'function'
|
|
34
|
+
? eventRecorder.isRecording() === true
|
|
35
|
+
: false;
|
|
36
|
+
const cancel = window.SootSim?.bridges?.cancelRecording;
|
|
37
|
+
if (typeof cancel === 'function') cancel();
|
|
38
|
+
return Boolean(hadStoreRecording || hadEventRecording);
|
|
39
|
+
})()`}).catch(()=>!1),o=await e.send({type:"evaluate",code:`(async () => {
|
|
40
|
+
const r = window.__sootsimRecorder;
|
|
41
|
+
if (r && typeof r.forceRelease === 'function') return await r.forceRelease();
|
|
42
|
+
return false;
|
|
43
|
+
})()`}).catch(()=>!1);return{store:r,headless:o}}async function Ae(e,r){let o=M();if(o){G(b(e,{port:r.port}).simId,o),o.mode==="video"?console.log(` recording ${o.mode} (${o.format} @ ${o.fps}fps) on sim ${o.simId??"?"} since ${o.startedAt}`):console.log(` recording ${o.mode} on sim ${o.simId??"?"} since ${o.startedAt}`);return}let i=b(e,{port:r.port}),t=v({...i,commandTimeoutMs:8e3});try{let n=await se(t);if(n==="recording"||n==="processing"||n==="prelude"){if(n==="prelude"){console.log(" a recording preview prelude is active. hidden setup is being\n captured for the next live/combined preview recording. finish\n it with `sootsim record start --mode combined`, or discard it\n with `sootsim record cancel`.");return}console.log(` a recording is in progress (engine state: ${n}), but not via
|
|
44
|
+
\`record start\` \u2014 it was started by an atomic \`record --duration\`
|
|
45
|
+
run or the in-browser record button, which own their own lifecycle.
|
|
46
|
+
if that controlling run is still alive it will finish on its own
|
|
47
|
+
(atomic \`--mode video/gif/png\` writes a local file from that
|
|
48
|
+
process; live/combined upload to /preview/<id>). if the run was
|
|
49
|
+
killed, the recording is abandoned and will NOT finish \u2014 reclaim
|
|
50
|
+
it now with \`sootsim record cancel\`, or it auto-reclaims when the
|
|
51
|
+
abandoned capture's deadline lapses.`)}else console.log(" no recording in progress")}finally{t.close()}}async function Fe(e,r){let o=M();if(!o){let s=b(e,{port:r.port}),c=v({...s,commandTimeoutMs:8e3});try{let a=await se(c);if(a==="recording"||a==="processing"||a==="prelude"){let m=await Ce(c);m.store&&a==="prelude"?console.log(" recording preview prelude cancelled"):m.store||m.headless?console.log(" 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."):console.log(" 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=b(e,{port:r.port});G(i.simId,o);let t=o.simId??i.simId??void 0,n=v({...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{O(),n.close()}console.log(" recording cancelled")}async function Te(e,r){let o=M();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let i=b(e,{port:r.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});G(i.simId,o);let t=o.simId??i.simId??void 0,n=e.includes("--open"),s=v({...i,simId:t,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await le(s);let u=await ue(s);O(),me(u,n,o.mode);return}let c=l(e,"--output"),a=I(c,`sootsim-${U()}.${o.format}`);B(D(a),{recursive:!0});let m=await s.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});m.ok||(console.error(` stop failed: ${m.error??"unknown error"}`),O(),process.exit(1)),m.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),O(),process.exit(1)),await ne(s,a),O(),console.log(` saved: ${a} (${z(m.size)})`)}finally{s.close()}}async function j(e){await L(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 ae(e,r){await L(e,`(() => {
|
|
52
|
+
const fn = window.__sootsimCaptureBundle
|
|
53
|
+
if (typeof fn !== 'function') return false
|
|
54
|
+
const snap = fn()
|
|
55
|
+
return !!(snap && snap.bundleUrl)
|
|
56
|
+
})()`)||(console.error(` --mode ${r} needs a guest app bundle to upload to /preview/<id>,
|
|
57
|
+
but this sim has no bundle loaded (a built-in shell screen like
|
|
58
|
+
photos/settings/home has none). open a metro/guest app first, or
|
|
59
|
+
use \`--mode video\` for a local screen recording with no upload.`),process.exit(1))}async function de(e,r,o){let i=Y();if(!i)return;let t=i.kind==="api-key"?i.secret:i.token,n=i.kind==="github"?{...Z(i),owner:o?.owner,repo:o?.repo}:o?{owner:o.owner,repo:o.repo}:null,s=r?r.replace(/\/$/,""):null;await e.send({type:"evaluate",code:`(() => {
|
|
60
|
+
const set = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.setSession
|
|
61
|
+
if (typeof set !== 'function') return false
|
|
62
|
+
set({ token: ${JSON.stringify(t)}, user: null })
|
|
63
|
+
window.__sootsimPreviewUploadIdentity = ${JSON.stringify(n)}
|
|
64
|
+
window.__sootsimPreviewUseInjectedBearer = true
|
|
65
|
+
${s?`window.__sootsimUploadOrigin = ${JSON.stringify(s)}`:"delete window.__sootsimUploadOrigin"}
|
|
66
|
+
return true
|
|
67
|
+
})()`})||(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 ce(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 le(e){await e.send({type:"evaluate",code:"void window.SootSim.bridges.stopRecording()"})}async function ue(e){let r=Date.now()+ee;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 ${ee/1e3}s`}}function me(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
|
|
68
|
+
replaces this capture at the same /preview/<id>.`),(o==="live"||o==="combined")&&typeof e.eventCount=="number"&&console.log(` captured ${e.eventCount} event${e.eventCount===1?"":"s"}`),(o==="live"||o==="combined")&&e.eventCount===0&&console.log(o==="combined"?` note: this combined recording captured no events \u2014 the Live tab has
|
|
69
|
+
nothing to replay. Video will play the captured screen recording.`:` note: this live recording captured no events \u2014 the preview has nothing
|
|
70
|
+
to replay and will boot a fresh interactive session instead.`),r&&K(e.previewUrl)}export{Oe as extToFormat,Be as resolveFormat,Ge as runRecord,l as valueOf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-HAWOAQAG.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-WTKTOL3C.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-WTKTOL3C.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-FRM355UL.js";import"./chunk-6BNLVMXA.js";import{a as b}from"./chunk-DM6WT7QM.js";import"./chunk-ECJBV65H.js";import"./chunk-WN7M3QON.js";import{f as m}from"./chunk-NXATOWWF.js";import{c as g,d as w,e as y,f as v,h as x}from"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";import{mkdirSync as A,writeFileSync as R}from"fs";import{dirname as E,resolve as F}from"path";async function J(t,o){let e=U(t);(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot \u2014 capture the canvas as a PNG
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as o}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-PM5NVKLP.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as Y}from"./chunk-277XAALA.js";import{b as j}from"./chunk-FRM355UL.js";import"./chunk-6BNLVMXA.js";import"./chunk-Y4BUVURT.js";import"./chunk-UXQWC5ZR.js";import"./chunk-DP7O5MHK.js";import{b as O}from"./chunk-6XZOEBTZ.js";import"./chunk-JHJNODXN.js";import"./chunk-XFQL74PF.js";import"./chunk-IBNRRAES.js";import"./chunk-RH4F2TF7.js";import"./chunk-PEHFE3LG.js";import"./chunk-CYV6Y6YV.js";import"./chunk-6NN2D4EJ.js";import"./chunk-CHQTO426.js";import"./chunk-FJYT7XL2.js";import"./chunk-5DJXZIFZ.js";import"./chunk-ECJBV65H.js";import"./chunk-RXH2SLKF.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-WN7M3QON.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-NXATOWWF.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as ee,c as D,d as te,e as H,f as ie,h as re,i as A,j as ne,k as se,l as oe,p as ae,s as k,t as ce,u as de,v as le,w as ue}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as ee,c as D,d as te,e as H,f as ie,h as re,i as A,j as ne,k as se,l as oe,p as ae,s as k,t as ce,u as de,v as le,w as ue}from"./chunk-FAPYGVIU.js";import"./chunk-CJY3AVI7.js";import{a as Q}from"./chunk-UXQWC5ZR.js";import"./chunk-DP7O5MHK.js";import{e as E}from"./chunk-XFQL74PF.js";import"./chunk-PEHFE3LG.js";import"./chunk-CHQTO426.js";import{d as Y}from"./chunk-5DJXZIFZ.js";import{a as F}from"./chunk-KASUZ5XV.js";import{a as z,b as X}from"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import{a as U}from"./chunk-6XD6CBJM.js";import{k as Z}from"./chunk-WTKTOL3C.js";import{A as $,B,D as J,E as K,F as V,G,H as q,I as N,u as L,v as W,y as T,z as j}from"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";import{spawn as Le}from"child_process";import w from"fs";import{createServer as Be}from"http";import S from"path";import{WebSocket as h,WebSocketServer as Ne}from"ws";import pe from"node:fs";import I from"node:path";var P=1;function Ae(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(a=>Number.isFinite(a)&&a>0)}var R=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let s=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,s,n)}catch(n){n instanceof k?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await oe()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
|
|
3
3
|
`)}}close(){for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return H();case"agent:upsert-project":return D(i.input??{});case"agent:delete-project":return re(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return ne(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-prompt":{let n=String(i.sessionId),o=A(n);if(!o)throw new k("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await de(n,r),this.notePromptAccepted(n,r,o.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await le(String(i.sessionId));let s=A(String(i.sessionId));return s&&this.broadcastSessionStatus(s),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new k("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async doStartSession(e){if(!te(e.projectId))throw new k("NO_PROJECT",`no project: ${e.projectId}`);let i=await ce(e);return this.broadcastSessionStatus(i.session),i}async autoAttachForUrl(e){let t=e.bundleUrl??"",i=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!i)return{project:null};let s=this.opts.getExcludePorts?.()??Ae(),o=(await E({excludePorts:s})).find(d=>String(d.port)===i);if(!o||!o.cwd)return{project:null};let r=H().find(d=>d.cwd===o.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],o.bundleUrl,t]));return{project:D({cwd:o.cwd,name:o.projectName??I.basename(o.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[o.cwd],knownBundleUrls:c,framework:r?.framework??ke(o.framework),bundleId:o.bundleId??r?.bundleId})}}getTranscript(e){let t=ae(e);return pe.existsSync(t)?pe.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=ee();return{userDataDir:e,storeFile:I.join(e,"attached-projects.json"),sessionsDir:I.join(e,"sessions"),transcriptsDir:I.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let s=this.subscriptions.get(t);if(s)return s.refCount++,{ok:!0,refCount:s.refCount};let n=ue(t,o=>{let r=this.coalescePromptEcho(t,o);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),o.type==="turn-completed"){let c=A(t);if(c)try{ie(c.projectId,{usd:o.costUsd,ts:o.ts})}catch(l){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${l instanceof Error?l.message:String(l)}
|
|
4
4
|
`)}}});return this.subscriptions.set(t,{unsubscribe:n,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let i=this.sessionsBySocket.get(e);return!i||!i.has(t)?{ok:!0,refCount:0}:(i.delete(t),this.decrementSubscription(t))}decrementSubscription(e){let t=this.subscriptions.get(e);if(!t)return{ok:!0,refCount:0};if(t.refCount--,t.refCount<=0){try{t.unsubscribe()}catch{}return this.subscriptions.delete(e),{ok:!0,refCount:0}}return{ok:!0,refCount:t.refCount}}dropSessionFanout(e){let t=this.subscriptions.get(e);if(t){try{t.unsubscribe()}catch{}this.subscriptions.delete(e)}for(let i of this.sessionsBySocket.values())i.delete(e);this.clearPromptTracking(e)}normalizePromptEnvelope(e){if(e?.prompt&&typeof e.prompt=="object"){let t=e.prompt;return{text:String(t.text??""),...typeof t.displayText=="string"?{displayText:t.displayText}:{},...typeof t.inspectSummary=="string"?{inspectSummary:t.inspectSummary}:{},...typeof t.inspectTrace=="string"?{inspectTrace:t.inspectTrace}:{}}}return{text:String(e?.text??""),...typeof e?.displayText=="string"?{displayText:e.displayText}:{},...typeof e?.inspectSummary=="string"?{inspectSummary:e.inspectSummary}:{},...typeof e?.inspectTrace=="string"?{inspectTrace:e.inspectTrace}:{}}}notePromptAccepted(e,t,i){let s=Date.now(),n=this.pendingPromptEchoes.get(e)??[];n.push({sentAt:s}),this.pendingPromptEchoes.set(e,n);let o=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,o);let r=t.displayText??t.text;return this.patchSession(e,{lastPrompt:r,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:r,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:s}),{ok:!0,queued:o>1,pendingTurns:o,queueDepth:Math.max(0,o-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){se(e,t);let i=A(e);i&&this.broadcastSessionStatus(i)}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[s,n]of this.sessionsBySocket)if(n.has(e)&&s.readyState===P)try{s.send(i)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let i of this.allSockets)if(i.readyState===P)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===P)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===P)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function ke(a){return a==="expo"?"expo":a==="one"||a==="vxrn"?"one":"unknown"}import Ee from"http";import Ie from"https";var M="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",Ce=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"}}];function Te(a){let e=a.toLowerCase();for(let t of Ce)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t.headers;return{}}function me(a){return{"accept-encoding":"identity","user-agent":M,...Te(a.hostname)}}var Pe=new Set(["host","origin","referer","user-agent","accept-encoding","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),Re={"access-control-allow-origin":"*","access-control-allow-methods":"GET,POST,PUT,DELETE,PATCH,OPTIONS","access-control-allow-headers":"*","access-control-expose-headers":"*","access-control-max-age":"3600"};function C(a){for(let[e,t]of Object.entries(Re))a.setHeader(e,t)}function Oe(a,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return a.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function _e(a,e){let t={};for(let[i,s]of Object.entries(a))s&&(Pe.has(i.toLowerCase())||(t[i]=Array.isArray(s)?s.join(", "):s));return Object.assign(t,e?me(e):{"user-agent":M}),t}function he(a){return a?.startsWith("/__fetch-proxy?")||a?.startsWith("/__proxy?")||!1}function fe(a){return a?!!(a.startsWith("/__app-api?")||a.startsWith("/__app-api/")):!1}async function ge(a,e){if(a.method==="OPTIONS"){C(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((a.url||"").split("?")[1]||"").get("url");if(!i){C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n=_e(a.headers,s),o;if(a.method!=="GET"&&a.method!=="HEAD"){let d=[];for await(let u of a)d.push(Buffer.isBuffer(u)?u:Buffer.from(u));d.length>0&&(o=Buffer.concat(d))}let r;try{r=await fetch(s.href,{method:a.method,headers:n,body:o,redirect:"follow"})}catch(d){C(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${Oe(s.href,d)}`);return}r.headers.forEach((d,u)=>{let p=u.toLowerCase();p==="content-encoding"||p==="transfer-encoding"||p==="content-length"||p==="set-cookie"||p.startsWith("access-control-")||e.setHeader(u,d)}),C(e);let c=r.headers.getSetCookie?.()??[];c.length>0&&e.setHeader("x-sootsim-set-cookie",c.join(", ")),e.statusCode=r.status;let l=Buffer.from(await r.arrayBuffer());e.end(l)}function Se(a,e){let t=a.url||"",i="",s="";if(t.startsWith("/__app-api?")){let l=new URL(t,"http://sootsim.local");i=l.searchParams.get("path")||"",s=l.searchParams.get("origin")?.trim()||""}else if(t.startsWith("/__app-api/"))i=t.slice(10);else return!1;if(!s)return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: missing origin query param"),!0;if(a.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":a.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":a.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,s)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let o=n.protocol==="https:"?Ie:Ee,r={...a.headers};delete r.host,r.host=n.host;let c=o.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:a.method,headers:r},l=>{let d=Object.keys(l.headers).filter(u=>{let p=u.toLowerCase();return!p.startsWith("access-control-")&&p!=="set-cookie"}).join(", ");e.writeHead(l.statusCode??502,{...l.headers,"access-control-allow-origin":a.headers.origin||"*","access-control-allow-credentials":"true","access-control-expose-headers":d}),l.pipe(e)});return c.on("error",l=>{e.statusCode=502,e.end(`app proxy error: ${l.message}`)}),a.pipe(c),!0}var De=new Set(["tap","keyboard"]),He=2e3,Me=1e3;function Ue(a){return!a||typeof a.type!="string"?!1:a.acquireLock===!0?!0:a.readOnly===!0?!1:De.has(a.type)}var Fe=5e3,We=3600*1e3,je="SOOTSIM_RUNTIME_UPDATE_INTERVAL_MS",$e={".html":"text/html; charset=utf-8",".js":"application/javascript",".cjs":"application/javascript",".mjs":"application/javascript",".css":"text/css; charset=utf-8",".json":"application/json; charset=utf-8",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".wasm":"application/wasm",".ttf":"font/ttf",".otf":"font/otf",".woff":"font/woff",".woff2":"font/woff2",".map":"application/json",".txt":"text/plain; charset=utf-8"};function ye(a,e,t){let i;try{let c=L();i=JSON.stringify(c)}catch{i="{}"}let s=e>0?`window.__sootsimBridgePort=${e};`:"",n=t?`window.__sootsimSootbeanOrigin=${JSON.stringify(t)};`:"",o=`<script>window.__sootsimSharedConfig=${i};`+s+n+`window.__sootsimCliVersion=${JSON.stringify(F())};</script>`,r=a.toString("utf8");return r.includes("</head>")?r.replace("</head>",o+"</head>"):r.includes("</body>")?r.replace("</body>",o+"</body>"):o+r}function ve(a){typeof a=="object"&&a!==null&&"unref"in a&&a.unref()}var O=class a{port;openUrlHandler;httpServer=null;wss=null;nextCommandId=1;nextSimNumber=161;sims=new Map;primarySimId=null;pendingCommands=new Map;cliBySentId=new Map;cliSimBySocket=new Map;cliLastCommandAt=new Map;cliIdentityKeyBySocket=new Map;cliLabelBySocket=new Map;restorableSims=new Map;nextCliFallbackId=1;cliIdleTimer=null;agentHost;static CLI_IDLE_TIMEOUT_MS=6e4;static CLI_LEASE_TTL_MS=6e5;static USER_ACTIVE_LEASE_TTL_MS=8e3;static USER_BOOT_LEASE_TTL_MS=6e4;static SIM_RECONNECT_TTL_MS=3e4;static SIM_IDLE_REAP_TTL_MS=30*6e4;preferredPort;portFallbackCount;simIdleReapTtlMs;shouldWriteLockfile;sootbeanOrigin=null;effectivePort=0;startedAt=0;heartbeatTimer=null;wsHeartbeatTimer=null;wsIsAlive=new WeakMap;static WS_HEARTBEAT_INTERVAL_MS=3e4;runtimeUpdateTimer=null;runtimeUpdateInFlight=null;activeRuntimeVersion=null;activeRuntimeDirPath=null;scanCache=null;scanCacheAt=0;inflightScan=null;static SCAN_FRESH_MS=2e3;constructor(e={}){this.preferredPort=e.port||7668,this.port=this.preferredPort,this.shouldWriteLockfile=e.writeLockfile===!0,this.portFallbackCount=Math.max(1,e.portFallbackCount??10),this.openUrlHandler=e.openUrl,this.agentHost=new R({getExcludePorts:e.agentScanExcludes}),this.sootbeanOrigin=e.sootbeanOrigin?.replace(/\/$/,"")||null,this.simIdleReapTtlMs=e.simIdleReapTtlMs??a.SIM_IDLE_REAP_TTL_MS}getAgentHost(){return this.agentHost}reapIdleSimsForTest(e=Date.now()){this.reapIdleSims(e)}start(e){this.startAsync(e)}async startAsync(e){if(this.httpServer||this.wss)return this.effectivePort;this.refreshActiveRuntime();for(let t=0;t<this.portFallbackCount;t++){let i=this.preferredPort+t;try{return await this.bindOnce(i,e?.silent===!0),this.effectivePort=i,this.port=i,this.startedAt=Date.now(),t>0&&!e?.silent&&process.stderr.write(`ws bridge bound to port ${i} (preferred ${this.preferredPort} was taken)
|
|
5
5
|
`),this.afterBind(),i}catch(s){if(s?.code!=="EADDRINUSE")throw s;e?.silent||process.stderr.write(`ws bridge port ${i} already in use, trying ${i+1}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-J2GYISVJ.js";import"./chunk-F3HP444U.js";import"./chunk-4LS5MZAI.js";import"./chunk-VMXWC2JO.js";import"./chunk-2PY3UZVO.js";import"./chunk-YUELRHGB.js";import"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";export{a as runSetupRepo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-OYMFNU3M.js";import*as l from"fs";import*as i from"path";import{fileURLToPath as f}from"url";function g(){try{let s=f(import.meta.resolve("sootsim/package.json"));return i.join(i.dirname(s),"skills")}catch{let s=i.dirname(f(import.meta.url));return i.resolve(s,"../../skills")}}var m=g();function d(s){let n=s.match(/^---\n([\s\S]*?)\n---/);if(!n)return null;let e=n[1],o=e.match(/^name:\s*(.+)$/m),r=e.match(/^description:\s*(.+)$/m);return o?{name:o[1].trim(),description:r?.[1]?.trim()||""}:null}function p(){if(!l.existsSync(m))return[];let s=l.readdirSync(m).filter(e=>e.endsWith(".md")),n=[];for(let e of s){let o=l.readFileSync(i.join(m,e),"utf8"),r=d(o);r&&n.push({...r,filename:e})}return n}function u(s,n){let e=i.join(m,s.filename),o=i.join(n,s.filename);l.copyFileSync(e,o),console.log(` copied ${s.name} \u2192 ${o}`)}async function h(s){if(s.includes("--list")||s.includes("-l")||s.length===0){let t=p();if(t.length===0){console.log(" no skills found");return}console.log(`
|
|
3
3
|
available skills:
|
|
4
4
|
`);for(let c of t)console.log(` ${c.name}`),console.log(` ${c.description}
|
|
5
5
|
`);console.log(" usage: sootsim skills <target-dir> [skill-name...]"),console.log(" example: sootsim skills ./my-project"),console.log(` example: sootsim skills ./my-project debug perf
|