sootsim 0.1.194 → 0.1.196
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-CM42FXZ2.js → agent-7VV2YS5K.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-RTNUXAUA.js → agent-wrapper-HEZELILJ.js} +2 -2
- package/dist-cli/chunks/{app-fonts-GRO4JNA7.js → app-fonts-CTFO7N3A.js} +2 -2
- package/dist-cli/chunks/{assert-KOOROQJI.js → assert-QCFTPXWT.js} +2 -2
- package/dist-cli/chunks/{auth-ASS7OY74.js → auth-5PL2DUSY.js} +2 -2
- package/dist-cli/chunks/beta-56TUG33G.js +2 -0
- package/dist-cli/chunks/{camera-LPPMHGJQ.js → camera-CDODMF26.js} +2 -2
- package/dist-cli/chunks/{chunk-63GQM7YC.js → chunk-3VDYVNXU.js} +2 -2
- package/dist-cli/chunks/{chunk-I7YBEJW2.js → chunk-4DBQ7YGH.js} +2 -2
- package/dist-cli/chunks/{chunk-HSC4YJX7.js → chunk-4FPIEYJQ.js} +2 -2
- package/dist-cli/chunks/{chunk-SIQUJOVP.js → chunk-64S5TQC3.js} +2 -2
- package/dist-cli/chunks/{chunk-RM4Q4CME.js → chunk-6B5ZSUG4.js} +4 -4
- package/dist-cli/chunks/{chunk-6RARYOEL.js → chunk-6S6Z5BWE.js} +2 -2
- package/dist-cli/chunks/chunk-7DESH3Y6.js +119 -0
- package/dist-cli/chunks/{chunk-DZCTXHGC.js → chunk-BUWXWDBA.js} +2 -2
- package/dist-cli/chunks/{chunk-YFT6QNH3.js → chunk-DBFIJJQS.js} +1 -1
- package/dist-cli/chunks/{chunk-QWZBLVT4.js → chunk-DKELBKSC.js} +1 -1
- package/dist-cli/chunks/{chunk-JPWVEJEC.js → chunk-DNXN75YR.js} +1 -1
- package/dist-cli/chunks/{chunk-HU4ZXOLS.js → chunk-DSK5O7XJ.js} +1 -1
- package/dist-cli/chunks/{chunk-JOFQ67LV.js → chunk-FCQEJWWZ.js} +1 -1
- package/dist-cli/chunks/chunk-FL2VXRHB.js +567 -0
- package/dist-cli/chunks/{chunk-5WHIIC72.js → chunk-GRWR6D2G.js} +2 -2
- package/dist-cli/chunks/{chunk-FFR4USO5.js → chunk-GRZH3TNX.js} +2 -2
- package/dist-cli/chunks/{chunk-NBT3VVSY.js → chunk-HDENRNBX.js} +2 -2
- package/dist-cli/chunks/chunk-I4LN4LGH.js +1 -0
- package/dist-cli/chunks/{chunk-K5IZM7I5.js → chunk-IKUTXUNH.js} +1 -1
- package/dist-cli/chunks/{chunk-H6CPDHFG.js → chunk-JVNX623C.js} +3 -3
- package/dist-cli/chunks/{chunk-Z2VLPNTW.js → chunk-KPYISBO7.js} +1 -1
- package/dist-cli/chunks/{chunk-4YYFY5HM.js → chunk-L2PR5XCL.js} +1 -1
- package/dist-cli/chunks/{chunk-454SCBS7.js → chunk-LDQF2IQA.js} +2 -2
- package/dist-cli/chunks/{chunk-EKLBXHUK.js → chunk-LEQWAE5B.js} +1 -1
- package/dist-cli/chunks/{chunk-CGC6VL3E.js → chunk-MI473PXL.js} +1 -1
- package/dist-cli/chunks/{chunk-LCX3R5GU.js → chunk-MLP4W2JW.js} +2 -2
- package/dist-cli/chunks/{chunk-P5VG36UG.js → chunk-O44TU6LO.js} +2 -2
- package/dist-cli/chunks/{chunk-NZCCIUPD.js → chunk-OA6H52UT.js} +2 -2
- package/dist-cli/chunks/chunk-OZTROCAR.js +92 -0
- package/dist-cli/chunks/{chunk-YZD3FUOU.js → chunk-P4AAS73X.js} +2 -2
- package/dist-cli/chunks/{chunk-IKNJYCUF.js → chunk-RTWIWFA6.js} +1 -1
- package/dist-cli/chunks/{chunk-TC34NFOE.js → chunk-SFRIHAPF.js} +1 -1
- package/dist-cli/chunks/{chunk-EZCGWPX4.js → chunk-SOUGUL4Y.js} +1 -1
- package/dist-cli/chunks/{chunk-JVJJWIDH.js → chunk-SZ6GB3RE.js} +3 -3
- package/dist-cli/chunks/{chunk-IXLWH3XE.js → chunk-T7YVS2SC.js} +4 -4
- package/dist-cli/chunks/{chunk-7CNBR64U.js → chunk-U5K2QCYY.js} +1 -1
- package/dist-cli/chunks/{chunk-V4U35I2X.js → chunk-VP5STTLY.js} +2 -2
- package/dist-cli/chunks/chunk-WEWPXSFB.js +1 -0
- package/dist-cli/chunks/{chunk-LDWXDKXP.js → chunk-WZNDVTK5.js} +1 -1
- package/dist-cli/chunks/{chunk-CQPAW4BG.js → chunk-XW6N7M6O.js} +2 -2
- package/dist-cli/chunks/{chunk-PIK54AHY.js → chunk-ZPSX53VU.js} +2 -2
- package/dist-cli/chunks/cli-version-GSRVHYD2.js +2 -0
- package/dist-cli/chunks/{compat-7T7W3OC2.js → compat-7DNTENZC.js} +3 -3
- package/dist-cli/chunks/{config-UMBFP5RC.js → config-OKXVJMWL.js} +2 -2
- package/dist-cli/chunks/{control-IC2NOIT3.js → control-ZK62SB6E.js} +2 -2
- package/dist-cli/chunks/daemon-L3GLGV2C.js +2 -0
- package/dist-cli/chunks/{debug-GTIWLJJM.js → debug-DSN6URLQ.js} +3 -3
- package/dist-cli/chunks/{desktop-3P4KTBZ6.js → desktop-H6V3QBVQ.js} +3 -3
- package/dist-cli/chunks/{detox-HCQMS3NM.js → detox-NQKPGIDN.js} +2 -2
- package/dist-cli/chunks/{device-7FBDA6PX.js → device-LWGRBUSC.js} +2 -2
- package/dist-cli/chunks/{diagnose-PETKX4PH.js → diagnose-C2WITABK.js} +2 -2
- package/dist-cli/chunks/drivers-E5YNBAEJ.js +2 -0
- package/dist-cli/chunks/flow-EB2IAY7O.js +2 -0
- package/dist-cli/chunks/help-LGJMWZ3D.js +2 -0
- package/dist-cli/chunks/{home-paths-WB64RMAZ.js → home-paths-K225NTYF.js} +2 -2
- package/dist-cli/chunks/inspect-KM2FF6CB.js +2 -0
- package/dist-cli/chunks/install-desktop-2BC7NTGT.js +2 -0
- package/dist-cli/chunks/{login-M2GVH7KT.js → login-COKO7POR.js} +4 -4
- package/dist-cli/chunks/{logout-52H5QYAR.js → logout-5S2FPEMI.js} +2 -2
- package/dist-cli/chunks/{maestro-G7YGMCVS.js → maestro-PEOFOZLJ.js} +2 -2
- package/dist-cli/chunks/mode-OSOIV7X5.js +95 -0
- package/dist-cli/chunks/optional-demo-registry-N7PJSAG7.js +2 -0
- package/dist-cli/chunks/{perf-5QN2GXUG.js → perf-E6E46PSB.js} +2 -2
- package/dist-cli/chunks/{record-LNYLU7SU.js → record-WGT4NYDD.js} +3 -3
- package/dist-cli/chunks/runtime-VP2R27QI.js +2 -0
- package/dist-cli/chunks/{screenshot-command-A5U6EWBL.js → screenshot-command-IVWNLSH7.js} +3 -3
- package/dist-cli/chunks/{serve-B3H4W7FQ.js → serve-WYMZH2OM.js} +2 -2
- package/dist-cli/chunks/{setup-P27VDHJN.js → setup-7NINUVSO.js} +3 -3
- package/dist-cli/chunks/{skills-VYXXJXES.js → skills-VSG2L2D5.js} +2 -2
- package/dist-cli/chunks/{storage-5RS7F336.js → storage-YTGOWC6P.js} +2 -2
- package/dist-cli/chunks/store-YSH3Y7TU.js +2 -0
- package/dist-cli/chunks/telemetry-HSELJJF7.js +2 -0
- package/dist-cli/chunks/{test-2NPQK3UG.js → test-BNI37OJN.js} +5 -5
- package/dist-cli/chunks/{timeline-NTNC5Q3Z.js → timeline-5HATH52U.js} +2 -2
- package/dist-cli/chunks/{upgrade-MS6NV4ZZ.js → upgrade-CZ4IDZPJ.js} +2 -2
- package/dist-cli/chunks/upload-SCPAVRE5.js +2 -0
- package/dist-cli/chunks/{version-NJWSIVF7.js → version-6IFPJNN5.js} +2 -2
- package/dist-cli/chunks/{web-7UB25AI6.js → web-WVJWPFIA.js} +2 -2
- package/dist-cli/chunks/{what-happened-YY6QNNFX.js → what-happened-J6XI43BG.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +3 -1
- package/dist-lib/sdk.mjs +3 -1
- package/dist-lib/skills.cjs +129 -13
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/beta-G6FAR5KL.js +0 -2
- package/dist-cli/chunks/chunk-DJSMPGAY.js +0 -1
- package/dist-cli/chunks/chunk-JQYDRLG5.js +0 -1
- package/dist-cli/chunks/chunk-NQCAVMZZ.js +0 -87
- package/dist-cli/chunks/chunk-ZKV5SZCW.js +0 -119
- package/dist-cli/chunks/chunk-ZXTNCFPG.js +0 -565
- package/dist-cli/chunks/cli-version-L74S57R3.js +0 -2
- package/dist-cli/chunks/daemon-PCQPUR6K.js +0 -2
- package/dist-cli/chunks/drivers-LY2JUEY7.js +0 -2
- package/dist-cli/chunks/flow-7DF6U3ID.js +0 -2
- package/dist-cli/chunks/help-PXW7E7CP.js +0 -2
- package/dist-cli/chunks/inspect-65JGU7SX.js +0 -2
- package/dist-cli/chunks/install-desktop-G4BHZ4HW.js +0 -2
- package/dist-cli/chunks/mode-SZKIDZVN.js +0 -99
- package/dist-cli/chunks/optional-demo-registry-DUIJDZXH.js +0 -2
- package/dist-cli/chunks/runtime-S74NISZH.js +0 -2
- package/dist-cli/chunks/store-VYO4FWD5.js +0 -2
- package/dist-cli/chunks/telemetry-BKSSASRW.js +0 -2
- package/dist-cli/chunks/upload-JUANX7G7.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as D,mkdirSync as O,readFileSync as g,rmSync as s,writeFileSync as P}from"fs";import{tmpdir as R}from"os";import{dirname as A,join as x,resolve as v}from"path";import{execFileSync as I}from"child_process";import{readFileSync as S}from"fs";import{createRequire as _}from"module";var o=null;function u(r){o||(o=N());try{return o(r)}catch{return null}}function N(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return b();if(process.platform==="darwin"){let n=T();return n||C()}return()=>null}function b(){return r=>{try{let n=S(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var y=3,d=216,E=16;function T(){if(!process.versions?.bun)return null;try{let r=_(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return a=>{if(Number(i.symbols.proc_pidinfo(a,y,0n,e,d))<=0)return null;let p=e.readUInt32LE(E);return p>0?p:null}}catch{return null}}function C(){return r=>{try{let t=I("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",F=["SOOTSIM_CLI_IDENTITY","AGENTBUS_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function m(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of F){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=m(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function J(){return m(process.ppid)}function l(){if(process.env[f])return v(process.env[f]);let r=L();return x(R(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!D(r))return null;try{let n=JSON.parse(g(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function j(){return h()?.simId||null}function K(r){let n=r.trim();if(!n)return;let t=l();O(A(t),{recursive:!0}),P(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
4
4
|
`)}function X(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e,X as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{o as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{o as d}from"./chunk-DKELBKSC.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
3
3
|
`);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?O({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
|
|
3
3
|
`)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
|
|
4
4
|
run: bun run --cwd packages/sootsim-engine build:electron-main
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{D as t,J as n,L as l,j as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{D as t,J as n,L as l,j as r}from"./chunk-DKELBKSC.js";function m(){let e=t(),i=r()?n():null;return i&&l(i)?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{m as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as m,b as I}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as m,b as I}from"./chunk-WZNDVTK5.js";import{a as w,b as _,c as T}from"./chunk-FCQEJWWZ.js";import{c as O}from"./chunk-U5K2QCYY.js";import{C as k,o as D,q as f}from"./chunk-DKELBKSC.js";import h from"fs";import v from"path";var c="default",F="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),F)}function G(e){return`sootsim-profile-${s(e)}`}function H(e){return v.join(D(),"Partitions",G(e))}function y(e){return v.join(f(),"playwright",s(e))}function b(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function A(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:A(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:A([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){k();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
|
|
3
3
|
`,"utf8"),h.renameSync(t,g()),r}function q(){return S(b()).profiles}function z(e){let r=s(e);return q().find(t=>t.id===r)??null}function E(e=c){let r=s(e),t=z(r);return t||B(r)}function B(e){let r=s(e),t=P(b());if(t.profiles.some(n=>n.id===r))throw new Error(`profile already exists: ${r}`);let o=new Date().toISOString(),i={id:r,createdAt:o,updatedAt:o};return S({version:a,profiles:[...t.profiles,i]}),i}function pe(e){let r=s(e);if(r===c)throw new Error("the default profile cannot be deleted; clear it instead");let t=P(b()),o=t.profiles.find(i=>i.id===r);if(!o)throw new Error(`profile not found: ${r}`);return S({version:a,profiles:t.profiles.filter(i=>i.id!==r)}),j(r),o}function j(e){let r=s(e);for(let t of[H(r),y(r)])try{h.rmSync(t,{recursive:!0,force:!0})}catch{}}function Y(){let e=w();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function K(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=w();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await T(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var M={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:Y,launch:K};function V(){let e=m();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim desktop install`)"}}async function J(e){let r=m();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await I(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var C={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:V,launch:J};import{spawn as X}from"child_process";import{closeSync as Z,mkdtempSync as Q,openSync as ee,readFileSync as re}from"fs";import{createRequire as te}from"module";import{tmpdir as L}from"os";import{join as W}from"path";var oe=`
|
|
4
4
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
5
5
|
const url = process.env.SOOTSIM_PW_URL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-DSK5O7XJ.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim compat \u2014 check package compatibility
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -20,7 +20,7 @@ examples:
|
|
|
20
20
|
sootsim compat react-native-reanimated
|
|
21
21
|
sootsim compat --json
|
|
22
22
|
sootsim compat --brief
|
|
23
|
-
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-
|
|
23
|
+
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-WVJWPFIA.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-WVJWPFIA.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
|
|
24
24
|
sootsim compatibility report
|
|
25
25
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as i,B as s,x as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as i,B as s,x as t}from"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
|
|
3
3
|
sootsim config \u2014 manage local CLI preferences
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-3VDYVNXU.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-64S5TQC3.js";import"./chunk-XW6N7M6O.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-SOUGUL4Y.js";import"./chunk-IKUTXUNH.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{f,m as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-BUWXWDBA.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-6B5ZSUG4.js";import{g as D,i as O,k as x}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
|
|
3
3
|
sootsim debug \u2014 drive __sootsimDebug from the terminal
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -170,7 +170,7 @@ examples:
|
|
|
170
170
|
} : null,
|
|
171
171
|
samples,
|
|
172
172
|
}
|
|
173
|
-
})()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-
|
|
173
|
+
})()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-KM2FF6CB.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
174
174
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
175
175
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
176
176
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-SZ6GB3RE.js";import{a as v,h as k}from"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import{a as u}from"./chunk-MI473PXL.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-I4LN4LGH.js";import{b as m,g as f,l as h}from"./chunk-ZPSX53VU.js";import{a as c}from"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim desktop \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -16,7 +16,7 @@ examples:
|
|
|
16
16
|
sootsim desktop --port 5173
|
|
17
17
|
sootsim desktop --profile qa
|
|
18
18
|
sootsim desktop --driver system
|
|
19
|
-
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-
|
|
19
|
+
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-2BC7NTGT.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
|
|
20
20
|
sootsim desktop \u2014 launch or install the desktop companion
|
|
21
21
|
|
|
22
22
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as S}from"./chunk-FL2VXRHB.js";import"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
|
|
3
3
|
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-WEWPXSFB.js";import{g as d,i as l,l as a}from"./chunk-4FPIEYJQ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import{g as c,h as r,i as g}from"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as E,i as R,l as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as E,i as R,l as b}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import{b as v}from"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
3
3
|
sootsim get diagnosis \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-I4LN4LGH.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c,d,e,f,g}from"./chunk-FL2VXRHB.js";import{c as a,d as b}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{d as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,f as hoistLeadingSimFlag,a as parseFlowFile,g as runFlow,e as runFlowPlayback,b as validateFlowFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-64S5TQC3.js";import"./chunk-XW6N7M6O.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-SOUGUL4Y.js";import"./chunk-IKUTXUNH.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{j as a,k as b}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{a as printShellPerfReport,b as runInspect};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as g,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as g,d as m}from"./chunk-VP5STTLY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";import{exec as O}from"node:child_process";import{randomBytes as S}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 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"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}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"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}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-HSELJJF7.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=S(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,$=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:$}),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-HSELJJF7.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-HSELJJF7.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-O44TU6LO.js";import{a as t,c as o}from"./chunk-VP5STTLY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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{e as w,f as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as w,f as v}from"./chunk-FL2VXRHB.js";import{c as y}from"./chunk-T7YVS2SC.js";import{a as h}from"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as u,i as g,l as T,m as N}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";function D(e){let o=e[0]?.toLowerCase()??"toggle";return o!=="on"&&o!=="off"&&o!=="toggle"&&(console.error(` unknown argument: "${o}" (expected on | off | toggle)`),process.exit(1)),o}async function h(e,o,n){let r=u(e,{port:o.port}),d=D(r.positional),c=g({...r,commandTimeoutMs:5e3});try{let i=!!(await T(c,"SootSim.bridges.settings.get"))?.[n.modeKey],a=d==="on"?!0:d==="off"?!1:!i;if(i===a)return console.log(` ${n.displayName}: already ${a?"on":"off"}`),{current:i,target:a,changed:!1};if(!await c.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
|
+
const modeKey = ${JSON.stringify(n.modeKey)}
|
|
4
|
+
const target = ${JSON.stringify(a)}
|
|
5
|
+
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
6
|
+
detail: { type: 'fire-action', id: ${JSON.stringify(n.actionId)} },
|
|
7
|
+
}))
|
|
8
|
+
const deadline = Date.now() + 1200
|
|
9
|
+
while (Date.now() < deadline) {
|
|
10
|
+
if (Boolean(window.SootSim?.bridges?.settings?.get?.()?.[modeKey]) === target) {
|
|
11
|
+
return true
|
|
12
|
+
}
|
|
13
|
+
await new Promise((resolve) => setTimeout(resolve, 40))
|
|
14
|
+
}
|
|
15
|
+
return false
|
|
16
|
+
})()`}))throw new Error(`${n.displayName} did not change to ${a?"on":"off"}; the live shell may not support this mode`);return console.log(` ${n.displayName}: ${i?"on":"off"} -> ${a?"on":"off"}`),{current:i,target:a,changed:!0}}finally{c.close()}}async function R(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
17
|
+
sootsim mode screenshot \u2014 toggle the screenshot-mode chrome overlay
|
|
18
|
+
|
|
19
|
+
usage:
|
|
20
|
+
sootsim mode screenshot [on|off|toggle]
|
|
21
|
+
|
|
22
|
+
arguments:
|
|
23
|
+
on enable screenshot mode (enables showFrame if needed)
|
|
24
|
+
off disable screenshot mode
|
|
25
|
+
toggle flip the current state (default)
|
|
26
|
+
|
|
27
|
+
examples:
|
|
28
|
+
sootsim mode screenshot
|
|
29
|
+
sootsim mode screenshot on
|
|
30
|
+
sootsim mode screenshot off
|
|
31
|
+
`),process.exit(0)),await h(e,o,{modeKey:"screenshotMode",displayName:"screenshot-mode",actionId:"toggle-screenshot-mode"})}var M=12e3;async function E(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
32
|
+
sootsim mode three \u2014 toggle the 3d device stage
|
|
33
|
+
|
|
34
|
+
usage:
|
|
35
|
+
sootsim mode three [on|off|toggle]
|
|
36
|
+
sootsim mode three configure [options]
|
|
37
|
+
|
|
38
|
+
arguments:
|
|
39
|
+
on enable 3d mode
|
|
40
|
+
off disable 3d mode
|
|
41
|
+
toggle flip the current state (default)
|
|
42
|
+
|
|
43
|
+
configure options:
|
|
44
|
+
--background <id> set the 3d background
|
|
45
|
+
--gradient <stops> custom gradient bg: comma-separated css hex stops,
|
|
46
|
+
e.g. "#0a0e1a,#16243f,#05080f" (overrides --background;
|
|
47
|
+
evenly spaced, or use "color@offset" for explicit %)
|
|
48
|
+
--gradient-angle <deg> custom gradient angle (default 180 = top\u2192bottom)
|
|
49
|
+
--colorway <id> set the phone colorway
|
|
50
|
+
--script <id> apply a camera preset pose
|
|
51
|
+
--progress <0..1> script progress to sample (default: 1)
|
|
52
|
+
--animate run the script instead of sampling one frame
|
|
53
|
+
--slow run the script slowly when --animate is set
|
|
54
|
+
--environment on|off enable or disable environment objects
|
|
55
|
+
--env-shape <id> orb | pill | diamond | pane
|
|
56
|
+
--env-spread <id> tight | medium | wide
|
|
57
|
+
--env-size <id> small | medium | large
|
|
58
|
+
--env-color <id> peach | gold | mint | sky | violet
|
|
59
|
+
--env-glow on|off enable or disable environment glow
|
|
60
|
+
--env-plastic on|off enable or disable environment plastic material
|
|
61
|
+
--room on|off enable or disable the room effect
|
|
62
|
+
--focus on|off enable or disable Focus depth of field
|
|
63
|
+
--focus-amount <id> subtle | medium | strong | dramatic
|
|
64
|
+
--focus-range <id> tight | balanced | wide
|
|
65
|
+
--reset-pose return to the default hero pose before other changes
|
|
66
|
+
|
|
67
|
+
examples:
|
|
68
|
+
sootsim mode three
|
|
69
|
+
sootsim mode three on
|
|
70
|
+
sootsim mode three configure --script hero-arc --background gradient-neon
|
|
71
|
+
sootsim mode three configure --environment on --env-shape pane --room on
|
|
72
|
+
sootsim mode three off
|
|
73
|
+
`),process.exit(0)),I(e)){await z(e,o);return}(await h(e,o,{modeKey:"threeMode",displayName:"three-mode",actionId:"toggle-three-mode"})).target&&await K(e,o)}function I(e){return e[0]==="configure"||e.some(o=>["--background","--gradient","--gradient-angle","--colorway","--script","--progress","--animate","--slow","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range","--reset-pose"].includes(o))}async function z(e,o){let n=u(e,{port:o.port,stripBooleanFlags:["--animate","--slow","--reset-pose"],stripValueFlags:["--background","--gradient","--gradient-angle","--colorway","--script","--progress","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"]}),r=P(e),d=g({...n,commandTimeoutMs:M+1e3});try{await F(d);let c=await N(d,"SootSim.bridges.threeMode.configure",r);console.log(` three-mode: configured (${_(c)})`)}finally{d.close()}}async function K(e,o){let n=u(e,{port:o.port}),r=g({...n,commandTimeoutMs:M+1e3});try{await F(r)}finally{r.close()}}async function F(e){let o=await e.send({type:"evaluate",code:`(async () => {
|
|
74
|
+
const deadline = Date.now() + ${M}
|
|
75
|
+
while (Date.now() < deadline) {
|
|
76
|
+
const settings = window.SootSim?.bridges?.settings?.get?.()
|
|
77
|
+
if (settings && settings.threeMode !== true) {
|
|
78
|
+
return { ready: false, disabled: true }
|
|
79
|
+
}
|
|
80
|
+
const bridge = window.SootSim?.bridges?.threeMode
|
|
81
|
+
const state = typeof bridge?.getState === 'function' ? bridge.getState() : null
|
|
82
|
+
if (state?.ready === true) return state
|
|
83
|
+
await new Promise((resolve) => setTimeout(resolve, 50))
|
|
84
|
+
}
|
|
85
|
+
const bridge = window.SootSim?.bridges?.threeMode
|
|
86
|
+
const state = typeof bridge?.getState === 'function' ? bridge.getState() : null
|
|
87
|
+
return state || { ready: false }
|
|
88
|
+
})()`});if(o?.ready===!0)return o;throw o?.disabled?new Error("3d mode is off; run `sootsim mode three on` before configure"):new Error("3d mode runtime did not become ready")}function P(e){let o=t=>e.find((l,s)=>e[s-1]===t),n={},r=o("--colorway");r&&(n.colorway=r);let d=o("--background");d&&(n.background=d);let c=o("--gradient");if(c){let t=c.split(",").map(S=>S.trim()).filter(Boolean),l=t.map((S,$)=>{let[A,O]=S.split("@"),f=O!==void 0?Number.parseFloat(O):t.length>1?$/(t.length-1):0;return f>1&&(f=f/100),Number.isFinite(f)||(f=t.length>1?$/(t.length-1):0),{color:A.trim(),offset:f}}),s=o("--gradient-angle"),v=s===void 0?void 0:Number.parseFloat(s);if(s!==void 0&&!Number.isFinite(v))throw new Error(`--gradient-angle expects a number, got "${s}"`);n.customGradient={stops:l,...v!==void 0?{angleDeg:v}:{}}}let b=m(o("--room"),"--room");b!==void 0&&(n.room=b);let i={},a=m(o("--focus"),"--focus");a!==void 0&&(i.enabled=a);for(let[t,l]of[["--focus-amount","amount"],["--focus-range","range"]]){let s=o(t);s&&(i[l]=s)}Object.keys(i).length>0&&(n.focus=i),e.includes("--reset-pose")&&(n.resetPose=!0);let w=m(o("--environment"),"--environment"),y={},p={};for(let[t,l]of[["--env-shape","shape"],["--env-spread","spread"],["--env-size","size"],["--env-color","color"]]){let s=o(t);s&&(y[l]=s)}let B=m(o("--env-glow"),"--env-glow");B!==void 0&&(p.glow=B);let k=m(o("--env-plastic"),"--env-plastic");k!==void 0&&(p.plastic=k),(w!==void 0||Object.keys(y).length>0||Object.keys(p).length>0)&&(n.environment=w===!1?!1:{pins:y,effects:p});let x=o("--script");if(x){let t=o("--progress"),l=t===void 0?1:Number.parseFloat(t);if(!Number.isFinite(l))throw new Error(`--progress expects a number from 0 to 1, got "${t}"`);n.script={id:x,progress:l,animate:e.includes("--animate"),slow:e.includes("--slow")}}return n}function m(e,o){if(e===void 0)return;let n=e.toLowerCase();if(["on","true","yes","1"].includes(n))return!0;if(["off","false","no","0"].includes(n))return!1;throw new Error(`${o} expects on or off, got "${e}"`)}function _(e){return[`ready=${!!e.ready}`,`background=${String(e.background??"unknown")}`,`colorway=${String(e.colorway??"unknown")}`,`environment=${e.environmentActive?"on":"off"}`,`room=${e.room?"on":"off"}`,`focus=${e.focus&&typeof e.focus=="object"&&e.focus.enabled?"on":"off"}`].join(", ")}var j=new Set(["--sim","--port","-p"]),L=new Set(["screenshot","three"]);function V(e){for(let o=0;o<e.length;o++){let n=e[o];if(n.startsWith("-")){j.has(n)&&o++;continue}return L.has(n)?{name:n,index:o}:null}return null}function W(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function C(){console.log(`
|
|
89
|
+
sootsim mode \u2014 toggle live display modes
|
|
90
|
+
|
|
91
|
+
usage:
|
|
92
|
+
sootsim mode screenshot [on|off|toggle]
|
|
93
|
+
sootsim mode three [on|off|toggle]
|
|
94
|
+
sootsim mode three configure [options]
|
|
95
|
+
`)}async function ee(e,o){if(e.includes("--help")||e.includes("-h")){C();return}let n=V(e);n||(C(),process.exit(1));let r=W(e,n.index);if(n.name==="screenshot"){await R(r,o);return}await E(r,o)}export{ee as runMode};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{k as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{k as x}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import{g as R,i as N,l as d,m as S}from"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";import{mkdirSync as W,writeFileSync as A}from"fs";import{dirname as J,resolve as B}from"path";import{WebSocket as E}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new E(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,l)=>{this.pending.set(n,{res:s,rej:l}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(w(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(w(e,"--sample-interval")??"0.1"),n=Number(w(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=w(e,"--match")??"/rn/",l=w(e,"--output")??w(e,"-o"),i=B(process.cwd(),l??"/tmp/sootsim.cpuprofile"),a=[];try{a=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return U(n),1}let f=a.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${a.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),W(J(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(A(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of _(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function U(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function _(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,l=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(l)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(l,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function w(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
|
|
3
3
|
sootsim perf react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P}from"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import{a as Z,c as ee}from"./chunk-HDENRNBX.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import{g as b,i as v,j as Q}from"./chunk-4FPIEYJQ.js";import{d as Y}from"./chunk-FCQEJWWZ.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-DBFIJJQS.js";import{b as X}from"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(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
3
|
the capture lock auto-releases, so simply retry the recording.
|
|
4
4
|
if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording|lock already held/i.test(s)&&(console.error(` ${o} failed: ${s}
|
|
5
5
|
a prior recording was abandoned and its capture is still
|
|
6
6
|
releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
|
|
7
|
-
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=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","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}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 qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-
|
|
7
|
+
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=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","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}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 qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-SCPAVRE5.js");await y(d,r);return}if(o.name==="stop"){await Pe(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=600;a>m&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 exceeds the ${m}s (10m) 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 x=e.includes("--open"),j=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,g=Math.max(100,Math.round(a*1e3)),K=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 P("record",{originOverride:K,allowGitHubAuth:!0});let d=v({...i,commandTimeoutMs:6e4});try{await q(d),await ae(d,t),t==="combined"&&await B(d),await de(d,K,pe);let y=await ce(d,t,t==="combined"?n:void 0);y.ok||(console.error(` start failed: recording store refused to start (${t})`+(y.error?`: ${y.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${a}s`),await new Promise(_=>setTimeout(_,g)),await le(d);let O=await ue(d);me(O,x,t)}finally{d.close()}return}let C=p?Number(p):null,R=Te(s,c,C);x&&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 B(h),R==="png"){let $=C??10,w=U(c,`sootsim-frames-${M()}`);c&&oe(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),E(w,{recursive:!0});for(let f of he(w))/^frame-\d+\.png$/.test(f)&&J(N(w,f),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${w}`);let S=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${g}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!S.ok||!S.requestId)&&(console.error(` frame capture start failed: ${S.error??"unknown error"}`),process.exit(1)),await new Promise(f=>setTimeout(f,g));let fe=Date.now()+Math.max(5e3,g),A=null;for(;;){let f=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${S.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)),A=f.frames??[];break}Date.now()>=fe&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(F=>setTimeout(F,100))}A.forEach((f,F)=>{let ge=`${w}/frame-${String(F+1).padStart(3,"0")}.png`;I(ge,Buffer.from(f.data,"base64"))}),console.log(` saved ${A.length} frames`);return}if(R==="gif"){let $=C??Math.max(10,Math.round(a*u/3)),w=U(c,`sootsim-${M()}.gif`);E(W(w),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${w}`);let S=await D(h,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${g}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",g);S||(console.error(" gif capture returned no frames"),process.exit(1)),I(w,Buffer.from(S.data,"base64")),console.log(` saved: ${w} (${G(S.size)})`);return}let d=U(c,`sootsim-${M()}.${R}`);E(W(d),{recursive:!0});let y={format:R,fps:u,durationMs:g};n&&(y.layers=n);let O=await D(h,`window.__sootsimRecorder.start(${JSON.stringify(y)})`,`${R} start`,g);O.ok||(console.error(` start failed: ${O.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(O.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 ${R} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,g));let _=await D(h,"window.__sootsimRecorder.stop()",`${R} encode/flush`,g);_.ok||(console.error(` stop failed: ${_.error??"unknown error"}`),process.exit(1)),_.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await ne(h,d),console.log(` saved: ${d} (${G(_.size)})`)}finally{h.close()}}var Ee=6e3;async function L(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}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 B(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
|
|
8
8
|
would be throttled to ~1fps and produce a frozen-looking file.
|
|
9
9
|
bring the chrome window to the foreground (un-minimize / switch to
|
|
10
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}I(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 Be(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 Te(e,r,o){return e||(o!=null?"png":Be(r)??"webm")}function M(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function Me(){let e=N(ve(),".sootsim","recordings");return E(e,{recursive:!0}),e}function U(e,r){return e?Se(process.cwd(),e):N(Me(),r)}function G(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 H(){return N(ye(),`sootsim-recording-${X()}.json`)}function T(){let e=H();if(!we(e))return null;try{return{mode:"video",...JSON.parse(be(e,"utf8"))}}catch{return J(e,{force:!0}),null}}function Ue(e){I(H(),JSON.stringify(e,null,2))}function k(){J(H(),{force:!0})}function V(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-JVNX623C.js";import"./chunk-MLP4W2JW.js";import"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";export{a as runRuntime};
|