sootsim 0.1.180 → 0.1.181
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-TWCD6VWU.js → agent-RKWUNS7I.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-Z47AOSU4.js → agent-wrapper-5EPZRSPB.js} +2 -2
- package/dist-cli/chunks/{app-fonts-NJDS2WKC.js → app-fonts-EU7F6Z3S.js} +2 -2
- package/dist-cli/chunks/{assert-E4M3BGYV.js → assert-RKFBXF3E.js} +2 -2
- package/dist-cli/chunks/beta-VXVNIBH6.js +2 -0
- package/dist-cli/chunks/{camera-AGZ365WS.js → camera-TD6M3UW4.js} +2 -2
- package/dist-cli/chunks/{chunk-X2S7O732.js → chunk-3DX6C7P7.js} +2 -2
- package/dist-cli/chunks/{chunk-YTE645KB.js → chunk-455VGZ2C.js} +9 -9
- package/dist-cli/chunks/{chunk-SC3LMYOI.js → chunk-4GUWBLYM.js} +1 -1
- package/dist-cli/chunks/{chunk-C3H3HNZU.js → chunk-5KF6ZRPL.js} +1 -1
- package/dist-cli/chunks/{chunk-5UNOKZOH.js → chunk-6OJJAJRM.js} +1 -1
- package/dist-cli/chunks/{chunk-ZU3YA54Y.js → chunk-7IY6HRHX.js} +1 -1
- package/dist-cli/chunks/chunk-7VFWDDKF.js +1 -0
- package/dist-cli/chunks/{chunk-TPTEYOPH.js → chunk-7WGUVK3H.js} +2 -2
- package/dist-cli/chunks/{chunk-GKC4WAAU.js → chunk-ANIFL7F2.js} +1 -1
- package/dist-cli/chunks/{chunk-NNEKSG7J.js → chunk-DFOAKJLV.js} +2 -2
- package/dist-cli/chunks/chunk-DG25DVQA.js +1 -0
- package/dist-cli/chunks/chunk-DXXFRQDT.js +2 -0
- package/dist-cli/chunks/{chunk-6W55QHRB.js → chunk-ELFPYLAD.js} +2 -2
- package/dist-cli/chunks/{chunk-SSTY3FZ7.js → chunk-EXA5KQMJ.js} +1 -1
- package/dist-cli/chunks/{chunk-WJMSITGC.js → chunk-FSWR7SL3.js} +1 -1
- package/dist-cli/chunks/{chunk-7HOX5AAM.js → chunk-HIDL7MR4.js} +2 -2
- package/dist-cli/chunks/{chunk-7FVSMP3H.js → chunk-IE7FPLMT.js} +1 -1
- package/dist-cli/chunks/{chunk-DFOQT3FH.js → chunk-IGSJWOD3.js} +1 -1
- package/dist-cli/chunks/{chunk-O3P4GCIC.js → chunk-JFDRB2AQ.js} +2 -2
- package/dist-cli/chunks/{chunk-AKVADO4S.js → chunk-JXIJPGAA.js} +1 -1
- package/dist-cli/chunks/{chunk-ZBS233ZK.js → chunk-KW2G6CYT.js} +2 -2
- package/dist-cli/chunks/chunk-MBWEZB7G.js +2 -0
- package/dist-cli/chunks/{chunk-6LLHL4Z4.js → chunk-MOLUWZMJ.js} +2 -2
- package/dist-cli/chunks/{chunk-J7ECVBNV.js → chunk-N5BWYBPY.js} +2 -2
- package/dist-cli/chunks/{chunk-WNBED3UT.js → chunk-NXOSVZ5V.js} +2 -2
- package/dist-cli/chunks/{chunk-7EYSKUGC.js → chunk-PHPGJPFL.js} +2 -2
- package/dist-cli/chunks/{chunk-5S5TI2OL.js → chunk-QRJWVT3L.js} +3 -3
- package/dist-cli/chunks/{chunk-PJ46BMD3.js → chunk-RYOEWY42.js} +2 -2
- package/dist-cli/chunks/{chunk-A3DQXEQJ.js → chunk-SFI66XFY.js} +2 -2
- package/dist-cli/chunks/{chunk-ZFKPEBUY.js → chunk-TF24QNTS.js} +1 -1
- package/dist-cli/chunks/{chunk-EJP4NI3Q.js → chunk-TVAG4EDK.js} +1 -1
- package/dist-cli/chunks/{chunk-T56KIOK2.js → chunk-TVUKWQKF.js} +2 -2
- package/dist-cli/chunks/{chunk-Y7PV4536.js → chunk-UQYVIUVV.js} +2 -2
- package/dist-cli/chunks/{chunk-6YPP7ICO.js → chunk-V53IQMHL.js} +2 -2
- package/dist-cli/chunks/{chunk-DPZ5NOVM.js → chunk-VBHBFJZ3.js} +1 -1
- package/dist-cli/chunks/{chunk-QXRIMG3C.js → chunk-VBQD7ZVI.js} +2 -2
- package/dist-cli/chunks/{chunk-5Z3IK75L.js → chunk-VNE4KDKB.js} +2 -2
- package/dist-cli/chunks/{chunk-DPYI7WHO.js → chunk-VPPTIGEA.js} +1 -1
- package/dist-cli/chunks/{chunk-3R532UY6.js → chunk-VYFQBXF5.js} +2 -2
- package/dist-cli/chunks/{chunk-FGRK5LV4.js → chunk-WAC236L6.js} +2 -2
- package/dist-cli/chunks/{chunk-W2JS7ZCS.js → chunk-WJ7YLEHP.js} +2 -2
- package/dist-cli/chunks/{chunk-RVH34DLB.js → chunk-WY2T6Z4D.js} +2 -2
- package/dist-cli/chunks/{chunk-FQ6FCKBQ.js → chunk-X25HNIMN.js} +1 -1
- package/dist-cli/chunks/{chunk-EC6TIZVO.js → chunk-XCQ5SHW4.js} +3 -3
- package/dist-cli/chunks/{chunk-6FPNI2NJ.js → chunk-Y6PKI2Q2.js} +2 -2
- package/dist-cli/chunks/cli-version-VH6P4API.js +2 -0
- package/dist-cli/chunks/{compat-I4K6EHFH.js → compat-2LW53L3X.js} +3 -3
- package/dist-cli/chunks/{control-FSW56XA7.js → control-TPJXIRFC.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-TS44ELSM.js → cpu-profile-ILWMOPGM.js} +2 -2
- package/dist-cli/chunks/daemon-BE42RCVB.js +2 -0
- package/dist-cli/chunks/{debug-WJBAZTDZ.js → debug-B3YI66U3.js} +3 -3
- package/dist-cli/chunks/{detox-NTJCZT7Y.js → detox-P4ZT3VE5.js} +2 -2
- package/dist-cli/chunks/{device-VZMWYTH6.js → device-L2NDHRYR.js} +3 -3
- package/dist-cli/chunks/{diagnose-VJFAE25R.js → diagnose-A4HWLBVV.js} +2 -2
- package/dist-cli/chunks/drivers-PZZCFUEV.js +2 -0
- package/dist-cli/chunks/{electron-BUS5EZZB.js → electron-RO3TPVY6.js} +3 -3
- package/dist-cli/chunks/flow-XB73D57F.js +2 -0
- package/dist-cli/chunks/help-S4Z6P3KT.js +2 -0
- package/dist-cli/chunks/{hints-WVYOKMAB.js → hints-G7S3VDTD.js} +2 -2
- package/dist-cli/chunks/{home-paths-5G3GDTLX.js → home-paths-OE3OK3DY.js} +2 -2
- package/dist-cli/chunks/{inspect-YZPQT6PV.js → inspect-WXM6H76N.js} +3 -3
- package/dist-cli/chunks/{install-desktop-KPIFQ5BJ.js → install-desktop-IMVDXK6B.js} +3 -3
- package/dist-cli/chunks/{keys-XMLWEKT7.js → keys-UKEWXNIR.js} +2 -2
- package/dist-cli/chunks/{login-4KYXIZE3.js → login-JMJIS5DW.js} +4 -4
- package/dist-cli/chunks/{logout-GWXYQJKY.js → logout-G3BGSQEH.js} +2 -2
- package/dist-cli/chunks/{maestro-73XTB4TQ.js → maestro-QZ5TJPFV.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-QZ3N5NTN.js +2 -0
- package/dist-cli/chunks/{preview-UO77YODM.js → preview-7QFRBTZB.js} +2 -2
- package/dist-cli/chunks/{profile-ZGTZRSKI.js → profile-MEH7CCAS.js} +2 -2
- package/dist-cli/chunks/{react-77P2ZPKP.js → react-LXBEY3LK.js} +2 -2
- package/dist-cli/chunks/{record-TYTQTISM.js → record-MRCRQ6YX.js} +2 -2
- package/dist-cli/chunks/runtime-BQEZQUBD.js +2 -0
- package/dist-cli/chunks/{screenshot-YQAQIKID.js → screenshot-ML2KX4BZ.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-2YK7P2A5.js → screenshot-mode-RAZUOTEN.js} +2 -2
- package/dist-cli/chunks/{screenshots-RFAXUO6J.js → screenshots-BZGYDJXS.js} +4 -4
- package/dist-cli/chunks/{screenshots-capture-5V4VLZ46.js → screenshots-capture-XNC3UM3X.js} +2 -2
- package/dist-cli/chunks/{serve-YKQNVYB3.js → serve-XWSFQLD7.js} +2 -2
- package/dist-cli/chunks/{setup-4VBJPQEG.js → setup-IDWFS4I4.js} +2 -2
- package/dist-cli/chunks/{skills-35JKCOHO.js → skills-ROKHF5AD.js} +2 -2
- package/dist-cli/chunks/{slides-TE5ZRF32.js → slides-CWXBPPJD.js} +2 -2
- package/dist-cli/chunks/store-FK6E5CQO.js +2 -0
- package/dist-cli/chunks/telemetry-CBM2UIAG.js +2 -0
- package/dist-cli/chunks/telemetry-WXD6NMEZ.js +2 -0
- package/dist-cli/chunks/{test-ZQCKRCMQ.js → test-ZAEKQ7VB.js} +3 -3
- package/dist-cli/chunks/{three-mode-MXI6TY4F.js → three-mode-EGZZJ65O.js} +2 -2
- package/dist-cli/chunks/{timeline-J4XMTY73.js → timeline-EBZ2SDVV.js} +2 -2
- package/dist-cli/chunks/{upgrade-4YYUPYWA.js → upgrade-MZRMKVVS.js} +2 -2
- package/dist-cli/chunks/upload-XQH6ZVU6.js +2 -0
- package/dist-cli/chunks/{version-SNWXESVB.js → version-CMX4HPI4.js} +2 -2
- package/dist-cli/chunks/{web-V5EIIUBC.js → web-R7FNAVBN.js} +2 -2
- package/dist-cli/chunks/{what-happened-DTF62KF5.js → what-happened-DUQVN5IX.js} +2 -2
- package/dist-cli/chunks/{whoami-LXD6FRWT.js → whoami-HJIRUPJA.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/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 +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/soot.md +1 -0
- package/src/screenshots/compose.ts +2 -5
- package/dist-cli/chunks/beta-6DYJAYMR.js +0 -2
- package/dist-cli/chunks/chunk-655RAZI6.js +0 -1
- package/dist-cli/chunks/chunk-BTV37XIX.js +0 -1
- package/dist-cli/chunks/chunk-KOVONBG5.js +0 -2
- package/dist-cli/chunks/chunk-LTLDMMVO.js +0 -2
- package/dist-cli/chunks/cli-version-3PTODKAG.js +0 -2
- package/dist-cli/chunks/daemon-XD4ETUFL.js +0 -2
- package/dist-cli/chunks/drivers-AXQDZXVN.js +0 -2
- package/dist-cli/chunks/flow-O3SCW6BQ.js +0 -2
- package/dist-cli/chunks/help-X32RDYQI.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-VJQAN5S5.js +0 -2
- package/dist-cli/chunks/runtime-YG4DSIZR.js +0 -2
- package/dist-cli/chunks/store-HKZGF2VP.js +0 -2
- package/dist-cli/chunks/telemetry-MZO7LCBJ.js +0 -2
- package/dist-cli/chunks/upload-BULXFLG3.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as g,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as g,d as m}from"./chunk-DFOAKJLV.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.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 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"||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-CBM2UIAG.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-CBM2UIAG.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-CBM2UIAG.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.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-KW2G6CYT.js";import{a as t,c as o}from"./chunk-DFOAKJLV.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.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 y,c as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as y,c as v}from"./chunk-QRJWVT3L.js";import"./chunk-HIDL7MR4.js";import"./chunk-DG25DVQA.js";import"./chunk-3DX6C7P7.js";import{b as h,c as w}from"./chunk-N5BWYBPY.js";import"./chunk-SFI66XFY.js";import"./chunk-V53IQMHL.js";import"./chunk-7WGUVK3H.js";import"./chunk-ANIFL7F2.js";import"./chunk-TF24QNTS.js";import"./chunk-Y6PKI2Q2.js";import"./chunk-TVAG4EDK.js";import"./chunk-MOLUWZMJ.js";import"./chunk-JFDRB2AQ.js";import"./chunk-RYOEWY42.js";import"./chunk-FSWR7SL3.js";import"./chunk-IE7FPLMT.js";import"./chunk-NXOSVZ5V.js";import"./chunk-JXIJPGAA.js";import"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import"./chunk-UQYVIUVV.js";import"./chunk-MBWEZB7G.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-VYFQBXF5.js";import"./chunk-DXXFRQDT.js";import"./chunk-4GUWBLYM.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:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-4GUWBLYM.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.181 | (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-MOLUWZMJ.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.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.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as w,e as b,h as m,i as f}from"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";function h(){console.log(`
|
|
3
3
|
sootsim react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P}from"./chunk-3DX6C7P7.js";import"./chunk-JFDRB2AQ.js";import{d as Z,f as ee}from"./chunk-RYOEWY42.js";import"./chunk-FSWR7SL3.js";import"./chunk-IE7FPLMT.js";import{c as b,e as v,f as Q}from"./chunk-NXOSVZ5V.js";import{d as Y}from"./chunk-JXIJPGAA.js";import"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import"./chunk-EXA5KQMJ.js";import{b as X}from"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-XCQ5SHW4.js";import"./chunk-PHPGJPFL.js";import"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";export{a as runRuntime};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as R}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as R}from"./chunk-5KF6ZRPL.js";import{a as E}from"./chunk-HIDL7MR4.js";import"./chunk-DG25DVQA.js";import{r as y}from"./chunk-ANIFL7F2.js";import{c as x,d as v,e as S,f as b,h as _}from"./chunk-NXOSVZ5V.js";import"./chunk-UQYVIUVV.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-VYFQBXF5.js";import{g as w}from"./chunk-DXXFRQDT.js";import"./chunk-4GUWBLYM.js";import{mkdirSync as $,writeFileSync as A}from"fs";import{dirname as M,resolve as F}from"path";async function Q(t,o){let e=q(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.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-WY2T6Z4D.js";import"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.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 q}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as q}from"./chunk-QRJWVT3L.js";import{b as L}from"./chunk-HIDL7MR4.js";import"./chunk-DG25DVQA.js";import"./chunk-3DX6C7P7.js";import{b as H}from"./chunk-N5BWYBPY.js";import"./chunk-SFI66XFY.js";import"./chunk-V53IQMHL.js";import"./chunk-7WGUVK3H.js";import"./chunk-ANIFL7F2.js";import"./chunk-TF24QNTS.js";import"./chunk-Y6PKI2Q2.js";import"./chunk-TVAG4EDK.js";import"./chunk-MOLUWZMJ.js";import"./chunk-JFDRB2AQ.js";import{d as U,e as K}from"./chunk-RYOEWY42.js";import"./chunk-FSWR7SL3.js";import"./chunk-IE7FPLMT.js";import"./chunk-NXOSVZ5V.js";import"./chunk-JXIJPGAA.js";import"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import"./chunk-UQYVIUVV.js";import"./chunk-MBWEZB7G.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-VYFQBXF5.js";import{a as y,b as A,c as v,d as E,e as O,f as C,g as _}from"./chunk-DXXFRQDT.js";import"./chunk-4GUWBLYM.js";import{mkdirSync as I,readFileSync as ye,writeFileSync as se}from"fs";import{tmpdir as We}from"os";import F from"path";import{mkdirSync as W,readFileSync as ae,writeFileSync as X}from"fs";import B from"path";function V(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 T(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ce(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 D(e,t){let o=ce(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),c=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${c}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function le(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 pe(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${D(t,.46)} 0%, ${D(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function R(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)";case"straight":default:return"none"}}function G(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function j(e){let t=D(e.color,e.opacity),o=D(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function Y(e,t){return!t.glow||e.color&&e.color!==y.color?e:{...e,color:t.glow}}function ue(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,c)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),m=a.pose||r.pose||"tilted-right",h=Y(r.shadow,c);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:${R(m)}`,`filter:${j(h)}`,"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,c)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),m=a.pose||r.pose,h=Y(r.shadow,c);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${G("translateX(-50%)",R(m))}`,`filter:${j(h)}`,"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=Math.round(t.width*.64*(s.scale??n.scale)),c=Math.round(t.height*(n.offsetY+(s.offsetY??0))),p=s.pose||n.pose,l=Y(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*.28)+c}px`,"left:50%",`width:${a}px`,"transform-origin:center top",`transform:${G("translateX(-50%)",R(p))}`,`filter:${j(l)}`,"z-index:2"].join(";")}}}function de({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=ue(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),c=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${T(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}">${T(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};">${T(o.eyebrow)}</div></div>`:"";return`<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -49,7 +49,7 @@ import{b as q}from"./chunk-5S5TI2OL.js";import{b as L}from"./chunk-7HOX5AAM.js";
|
|
|
49
49
|
<div id="device"><img src="${i}" alt="" /></div>
|
|
50
50
|
</div>
|
|
51
51
|
</body>
|
|
52
|
-
</html>`}async function Z(e,t,o){let i=[],n=o??await(async()=>{let{chromium:r}=await import("playwright");return r.launch({headless:!0})})();try{let r=await n.newContext({viewport:{width:1280,height:720}});try{for(let a of t){let p=`data:image/png;base64,${ae(a.imagePath).toString("base64")}`;for(let l of e.canvases){let
|
|
52
|
+
</html>`}async function Z(e,t,o){let i=[],n=o??await(async()=>{let{chromium:r}=await import("playwright");return r.launch({headless:!0})})();try{let r=await n.newContext({viewport:{width:1280,height:720}});try{for(let a of t){let p=`data:image/png;base64,${ae(a.imagePath).toString("base64")}`;for(let l of e.canvases){let m=await r.newPage();try{await m.setViewportSize({width:l.width,height:l.height}),await m.setContent(de({canvas:l,compose:e,slide:a.slide,imageDataUrl:p}),{waitUntil:"load"}),await m.waitForTimeout(20);let h=B.join(e.outDir,l.name,e.locale);W(h,{recursive:!0});let P=B.join(h,`${a.slide.assetKey}.png`),g=await m.screenshot({type:"png",clip:{x:0,y:0,width:l.width,height:l.height}});X(P,g),i.push({slideId:a.slide.id,canvas:l.name,locale:e.locale,outputPath:P,sourcePath:a.imagePath})}finally{await m.close()}}}}finally{await r.close()}}finally{!o&&typeof n.close=="function"&&await n.close()}W(e.outDir,{recursive:!0});let s=B.join(e.outDir,"manifest.json");return X(s,JSON.stringify({generatedAt:new Date().toISOString(),locale:e.locale,outputs:i},null,2)),{manifestPath:s,outputs:i.map(r=>r.outputPath),entries:i}}function $(e){return typeof e=="string"&&e.length>0?e:void 0}async function J(e){let o=`${e.origin.replace(/\/$/,"")}/api/sootsim/screenshot-decks?org=${encodeURIComponent(e.org)}&repo=${encodeURIComponent(e.repo)}`,i=await fetch(o,{headers:{Authorization:e.authHeader}});if(!i.ok){let a=await i.text().catch(()=>"");throw new Error(`org deck fetch failed (${i.status} ${i.statusText}) for ${e.org}/${e.repo}${a?` \u2014 ${a.slice(0,200)}`:""}`)}let s=(await i.json()).decks?.[0];if(!s||!s.config||typeof s.config!="object")return null;let r=s.config.frames;return Array.isArray(r)?r.map(a=>{let c=a??{};return{title:$(c.title),subtitle:$(c.subtitle),bgTop:$(c.bgTop),bgBottom:$(c.bgBottom),titleColor:$(c.titleColor)}}):null}function Q(e,t){e.compose.slides.forEach((o,i)=>{let n=t[i];if(n&&(n.title!=null&&(o.headline=n.title),n.subtitle!=null&&(o.subheadline=n.subtitle),n.bgTop&&n.bgBottom)){let s={type:"gradient",direction:180,stops:[{offset:0,color:v(n.bgTop)},{offset:1,color:v(n.bgBottom)}]};o.background=s}})}import{readFileSync as me}from"fs";import S from"path";function u(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function N(e,t){if(!u(e))throw new Error(`${t} must be an object`);return e}function f(e,t=""){return typeof e=="string"?e:t}function w(e){return typeof e=="string"&&e.trim().length>0?e.trim():null}function ee(e,t){return typeof e=="boolean"?e:t}function b(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function te(e,t){return typeof e!="string"||e.trim().length===0?t:Object.prototype.hasOwnProperty.call(_,e)?e:null}function re(e,t){if(typeof e=="string"){let n=C(e);if(!n)throw new Error(`unknown background preset: ${e}`);return n}if(!u(e))return O(t);let o=e.type==="solid"||e.type==="gradient"?e.type:t.type;if(o==="solid")return{type:o,color:f(e.color,t.color??"#000000"),glow:w(e.glow)??t.glow};let i=Array.isArray(e.stops)?e.stops.map(n=>{if(!u(n))return null;let s=b(n.offset,Number.NaN),r=w(n.color);return!Number.isFinite(s)||!r?null:{offset:s,color:r}}).filter(n=>!!n):t.stops?.map(n=>({...n}))??[];return{type:o,direction:b(e.direction,t.direction??180),glow:w(e.glow)??t.glow,stops:i.length>0?i:t.stops?.map(n=>({...n}))??[]}}function fe(e){let o=(Array.isArray(e)?e:["iphone-6-9"]).map(i=>{if(typeof i!="string")throw new Error("compose.canvases entries must be strings");let n=E(i);if(!n)throw new Error(`unknown canvas preset: ${i}`);return n});if(o.length===0)throw new Error("compose.canvases must include at least one preset");return o}function he(e){switch(e){case"editorial-left":case"minimal-bottom":case"none":case"bold-top":return e;default:return"bold-top"}}function ge(e){switch(e){case"plan":case"flow":case"auto":return e;default:return"auto"}}function oe(e){switch(e){case"straight":case"tilted-left":case"tilted-right":case"cut-bottom":case"cut-top":return e;default:return}}function k(e,t){return S.isAbsolute(t)?t:S.resolve(e,t)}function we(e,t){if(!Array.isArray(e)||e.length===0)throw new Error("compose.slides must be a non-empty array");return e.map((o,i)=>{let n=N(o,`compose.slides[${i}]`),s=w(n.screenshot);if(!s)throw new Error(`compose.slides[${i}].screenshot is required`);let r=w(n.id),a=V(r||s);return{id:r||a,assetKey:a,screenshot:s,headline:f(n.headline),subheadline:f(n.subheadline),eyebrow:f(n.eyebrow),pose:oe(n.pose),scale:typeof n.scale=="number"&&Number.isFinite(n.scale)?n.scale:void 0,offsetY:typeof n.offsetY=="number"&&Number.isFinite(n.offsetY)?n.offsetY:void 0,background:n.theme||n.background?re(n.theme??n.background,t):void 0}})}function ne(e){let t=S.resolve(e),o=S.dirname(t),i=H.parse(me(t,"utf8")),n=N(i,"screenshots plan"),s=N(n.capture??{},"capture"),r=N(n.compose??{},"compose"),a=typeof n.app=="number"?String(n.app):w(n.app),c=te(n.device,null),p=k(o,f(s.out,S.join(".sootsim","screenshots","capture"))),l=w(s.from),m=w(s.flow);if(!l&&!m)throw new Error("capture.flow or capture.from is required");let h=s.mode==="raw"||s.mode==="framed"||s.mode==="raw+framed"?s.mode:"raw+framed",P=ge(s.pathMode),g=re(r.background??"cyan",C("cyan")),d={show:ee(r.frame&&u(r.frame)?r.frame.show:void 0,!0),style:te(r.frame&&u(r.frame)?r.frame.style:null,null)||c||A,pose:oe(r.frame&&u(r.frame)?r.frame.pose:void 0)||"straight",scale:b(r.frame&&u(r.frame)?r.frame.scale:void 0,1),offsetY:b(r.frame&&u(r.frame)?r.frame.offsetY:void 0,0),shadow:{color:f(r.frame&&u(r.frame)&&u(r.frame.shadow)?r.frame.shadow.color:void 0,y.color),blur:b(r.frame&&u(r.frame)&&u(r.frame.shadow)?r.frame.shadow.blur:void 0,y.blur),spread:b(r.frame&&u(r.frame)&&u(r.frame.shadow)?r.frame.shadow.spread:void 0,y.spread),opacity:b(r.frame&&u(r.frame)&&u(r.frame.shadow)?r.frame.shadow.opacity:void 0,y.opacity)}};return{planPath:t,planDir:o,appTarget:a,deviceModel:c,capture:{flowPath:m?k(o,m):null,fromDir:l?k(o,l):null,outDir:p,rawDir:l?k(o,l):S.join(p,"raw"),framedDir:S.join(p,"framed"),mode:h,pathMode:P,simId:w(s.sim),openInNewSim:ee(s.new,!1)},compose:{outDir:k(o,f(r.out,S.join(".sootsim","screenshots","exports"))),locale:f(r.locale,"en"),canvases:fe(r.canvases),frame:d,background:g,text:{preset:he(r.text&&u(r.text)?r.text.preset:void 0),color:f(r.text&&u(r.text)?r.text.color:void 0,"#ffffff"),subColor:f(r.text&&u(r.text)?r.text.subColor:void 0,"rgba(232,240,247,0.86)"),eyebrowColor:f(r.text&&u(r.text)?r.text.eyebrowColor:void 0,"rgba(229,242,255,0.72)")},slides:we(r.slides,g)}}}function Se(e){return e.capture.pathMode==="plan"||e.capture.pathMode==="flow"?e.capture.pathMode:e.capture.fromDir?"flow":"plan"}function be(e,t){if(!e.capture.flowPath)throw new Error("capture flow path is required to build flow args");let o=[e.capture.flowPath],i=Se(e);o.push("--screenshots",e.capture.rawDir),i==="flow"&&o.push("--screenshot-paths","flow");let n=t.appTarget??e.appTarget,s=t.deviceModel??e.deviceModel,r=t.simId??e.capture.simId;return n&&o.push("--url",n),s&&o.push("--device",s),r&&o.push("--sim",r),e.capture.openInNewSim&&o.push("--new"),o}function z(e,t){return F.isAbsolute(t)?t:F.join(e.capture.rawDir,t)}function Pe(e){return F.join(e.capture.outDir,"manifest.json")}async function xe(e,t){if(!e.capture.flowPath)return;I(e.capture.rawDir,{recursive:!0});let o=be(e,t),i=await q(o);if(i!==0)throw new Error(`flow capture failed with exit code ${i}`)}async function $e(e,t){let o=new Map;I(e.capture.framedDir,{recursive:!0});let i=t??await(async()=>{let{chromium:n}=await import("playwright");return n.launch({headless:!0})})();try{let n=await L(i);try{for(let s of e.compose.slides){let r=z(e,s.screenshot),a=ye(r),c=await n.compose(a,e.compose.frame.style),p=F.join(e.capture.framedDir,`${s.assetKey}.png`);se(p,c),o.set(s.id,p)}}finally{await n.close()}}finally{!t&&typeof i.close=="function"&&await i.close()}return o}function ke(e,t,o){let i=[],n=[];I(e.capture.outDir,{recursive:!0});let s=Pe(e),r=e.compose.slides.map(a=>{let c=z(e,a.screenshot),p=t.get(a.id)??null;return i.push(c),p&&n.push(p),{id:a.id,screenshot:a.screenshot,rawPath:c,framedPath:p}});return se(s,JSON.stringify({generatedAt:new Date().toISOString(),deviceModel:o,mode:e.capture.mode,rawDir:e.capture.rawDir,framedDir:e.capture.framedDir,slides:r},null,2)),{manifestPath:s,rawDir:e.capture.rawDir,framedDir:e.capture.framedDir,rawFiles:i,framedFiles:n}}function Me(e,t){return e.compose.slides.map(o=>({slide:o,imagePath:e.compose.frame.show===!0?t.get(o.id)??z(e,o.screenshot):z(e,o.screenshot)}))}async function ie(e,t={}){let o=ne(e);t.orgDeckFrames&&t.orgDeckFrames.length>0&&Q(o,t.orgDeckFrames);let i=t.deviceModel??o.deviceModel;t.composeOnly||await xe(o,t);let n=o.capture.mode!=="raw"||!t.captureOnly&&o.compose.frame.show===!0,r=n||!t.captureOnly?await(async()=>{let{chromium:a}=await import("playwright");return a.launch({headless:!0})})():null;try{let a=n?await $e(o,r??void 0):new Map,c=ke(o,a,i);if(t.captureOnly)return{plan:o,capture:c,compose:null};let p=Me(o,a),l=await Z(o.compose,p,r??void 0);return{plan:o,capture:c,compose:l}}finally{r&&typeof r.close=="function"&&await r.close()}}async function st(e,t={}){if(e.includes("--help")||e.includes("-h"))return console.log(`
|
|
53
53
|
sootsim screenshots \u2014 capture and compose app-store screenshot sets
|
|
54
54
|
|
|
55
55
|
usage:
|
|
@@ -71,4 +71,4 @@ examples:
|
|
|
71
71
|
sootsim screenshots --plan app-store.yaml
|
|
72
72
|
sootsim screenshots --plan app-store.yaml --sim a9
|
|
73
73
|
sootsim screenshots --plan app-store.yaml --org acme --repo mobile
|
|
74
|
-
`),0;let o=
|
|
74
|
+
`),0;let o=d=>e.find((M,x)=>e[x-1]===d),i=new Set(["--plan","--sim","--app","--device","--org","--repo","--api-origin"]),n=e.filter((d,M)=>{if(d.startsWith("-"))return!1;let x=e[M-1];return!x||!i.has(x)}),s=o("--plan")||n[0];if(!s)return console.error(" error: screenshots plan path is required (`--plan <path>`)."),1;let r=o("--sim")?.trim()||null,a=o("--app")?.trim()||null,c=o("--device")?.trim()||null,p=o("--org")?.trim()||null,l=o("--repo")?.trim()||null,m=o("--api-origin")?.trim()||null,h=e.includes("--capture-only"),P=e.includes("--compose-only"),g=null;if(p||l){if(!p||!l)return console.error(" error: --org and --repo must be passed together."),1;let d=U();if(!d)return console.error(" error: --org/--repo needs auth \u2014 run `sootsim login` or set SOOTSIM_API_KEY."),1;let M=m||(d.kind==="session"?d.origin:"https://sootbean.com");try{g=await J({org:p,repo:l,origin:M,authHeader:K(d)})}catch(x){return console.error(` ${x.message}`),1}!g||g.length===0?console.log(` note: no org deck for ${p}/${l} \u2014 composing with the plan's copy/colors.`):console.log(` org deck: ${g.length} slide(s) from ${p}/${l}`)}try{let d=await ie(s,{simId:r,appTarget:a,deviceModel:c,captureOnly:h,composeOnly:P,orgDeckFrames:g});return console.log(` capture manifest: ${d.capture.manifestPath}`),d.compose?(console.log(` compose manifest: ${d.compose.manifestPath}`),console.log(` exports: ${d.compose.outputs.length}`)):console.log(" compose skipped"),0}catch(d){return console.error(` screenshots failed: ${d.message}`),1}}export{st as runScreenshots};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as I}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as I}from"./chunk-RYOEWY42.js";import"./chunk-DFOAKJLV.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";import{execSync as E}from"node:child_process";import{mkdirSync as L,mkdtempSync as W,rmSync as q,writeFileSync as z}from"node:fs";import{tmpdir as H}from"node:os";import{dirname as J,isAbsolute as K,join as A,resolve as V}from"node:path";import{chromium as Y}from"playwright-core";import{execSync as j}from"node:child_process";function N(o){let e=o;if(e&&typeof e.process=="function")try{let t=e.process();if(t&&typeof t.pid=="number"&&t.pid>0)return t.pid}catch{}if(e&&typeof e.browser=="function")try{let t=e.browser();if(t)return N(t)}catch{}return null}function x(o){let e=[];try{e=j(`pgrep -P ${o} || true`).toString().split(`
|
|
3
3
|
`).filter(Boolean)}catch{}for(let t of e)x(Number(t));try{process.kill(o,"SIGKILL")}catch{}}var C=new Set,M=!1;function B(){if(M)return;M=!0;let o=()=>{for(let e of C)x(e)};process.on("SIGTERM",()=>{o(),process.exit(0)}),process.on("SIGINT",()=>{o(),process.exit(0)}),process.on("exit",o)}async function U(o){let e=await o(),t=N(e),n=new Set;t!=null&&(n.add(t),C.add(t),B());let i=e;return typeof i.on=="function"&&i.on("disconnected",()=>{for(let c of n)C.delete(c)}),{browser:e,reapNow:()=>{for(let c of n)x(c),C.delete(c);n.clear()}}}var Q=`
|
|
4
4
|
sootsim screenshots capture \u2014 headlessly capture + upload App Store slides
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as ae,c as H,d as ce,e as F,f as de,h as le,i as C,j as ue,k as pe,l as me,p as he,s as v,t as fe,u as ge,v as Se,w as ye}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as ae,c as H,d as ce,e as F,f as de,h as le,i as C,j as ue,k as pe,l as me,p as he,s as v,t as fe,u as ge,v as Se,w as ye}from"./chunk-WJ7YLEHP.js";import"./chunk-IGSJWOD3.js";import{g as se}from"./chunk-PHPGJPFL.js";import{f as P}from"./chunk-V53IQMHL.js";import"./chunk-TF24QNTS.js";import{a as oe}from"./chunk-JFDRB2AQ.js";import"./chunk-RYOEWY42.js";import"./chunk-FSWR7SL3.js";import"./chunk-IE7FPLMT.js";import"./chunk-NXOSVZ5V.js";import{d as ne}from"./chunk-JXIJPGAA.js";import{a as Q,b as ee}from"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import{a as ie,b as re}from"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import{C as E,D as J,E as K,F as D,H as V,I as G,K as q,M as z,N as X,O as Y,P as U,Q as Z,y as M,z as j}from"./chunk-X25HNIMN.js";import{a as te}from"./chunk-VPPTIGEA.js";import"./chunk-4GUWBLYM.js";import{spawn as dt}from"child_process";import I from"fs";import{createServer as lt}from"http";import S from"path";import{WebSocket as h,WebSocketServer as ut}from"ws";import Ae from"node:fs";import _ from"node:path";import{spawn as Be}from"node:child_process";import Ne from"node:fs";import Me from"node:os";import De from"node:path";var ve=/^[A-Za-z0-9._:-]{1,160}$/;function W(o){if(!o?.startsWith("AGENTBUS_SESSION:"))return null;let e=o.slice(17).trim();return ve.test(e)?e:null}function be(o){return ve.test(o)}function Ue(o){return typeof o.text=="string"?o.text.trim():""}function He(o){let e=o?.trim();if(e)return e;let t=process.env.AGENTBUS_COMMAND?.trim();if(t)return t;let i=De.join(Me.homedir(),".local","bin","agentbus");return Ne.existsSync(i)?i:"agentbus"}async function we(o){let e=o.sessionId.trim();if(!be(e))throw new Error(`invalid agentbus session id: ${e||"<empty>"}`);let t=Ue(o.prompt);if(!t)throw new Error("prompt text is empty");let i=He(o.command),s=o.timeoutMs??15e3;await new Promise((n,a)=>{let r=Be(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),c="",l=setTimeout(()=>{try{r.kill("SIGTERM")}catch{}a(new Error(`agentbus send timed out after ${Math.round(s/1e3)}s`))},s);r.stderr?.setEncoding("utf8"),r.stderr?.on("data",d=>{c.length<4e3&&(c+=String(d))}),r.on("error",d=>{clearTimeout(l),a(d)}),r.on("exit",(d,u)=>{if(clearTimeout(l),d===0){n();return}let p=c.trim();a(new Error(p||`agentbus send exited with ${u?`signal ${u}`:`code ${d??"unknown"}`}`))})})}var x=1;function Fe(){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(o=>Number.isFinite(o)&&o>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 v?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 me()}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 F();case"agent:upsert-project":return H(i.input??{});case"agent:delete-project":return le(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return ue(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-claimed-prompt":return this.sendClaimedPrompt(i);case"agent:send-prompt":{let n=String(i.sessionId),a=C(n);if(!a)throw new v("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await ge(n,r),this.notePromptAccepted(n,r,a.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await Se(String(i.sessionId));let s=C(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 v("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async sendClaimedPrompt(e){let t=typeof e.simId=="string"?e.simId.trim():"";if(!t)throw new v("NO_SIM","agent:send-claimed-prompt requires simId");let i=this.opts.resolveCliLease?.(t)??null;if(!i||i.kind!=="cli"||i.expiresAt<=Date.now())throw new v("NO_CLAIM",`sim ${t} has no active CLI claim`);let s=W(i.cliIdentityKey);if(!s)throw new v("UNSUPPORTED_CLAIM",`sim ${t} is claimed by a CLI identity that is not promptable`);return await we({sessionId:s,prompt:this.normalizePromptEnvelope(e)}),{ok:!0,routed:"agentbus",sessionId:s}}async doStartSession(e){if(!ce(e.projectId))throw new v("NO_PROJECT",`no project: ${e.projectId}`);let i=await fe(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?.()??Fe(),a=(await P({excludePorts:s})).find(d=>String(d.port)===i);if(!a||!a.cwd)return{project:null};let r=F().find(d=>d.cwd===a.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],a.bundleUrl,t]));return{project:H({cwd:a.cwd,name:a.projectName??_.basename(a.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[a.cwd],knownBundleUrls:c,framework:r?.framework??We(a.framework),bundleId:a.bundleId??r?.bundleId})}}getTranscript(e){let t=he(e);return Ae.existsSync(t)?Ae.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=ae();return{userDataDir:e,storeFile:_.join(e,"attached-projects.json"),sessionsDir:_.join(e,"sessions"),transcriptsDir:_.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=ye(t,a=>{let r=this.coalescePromptEcho(t,a);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),a.type==="turn-completed"){let c=C(t);if(c)try{de(c.projectId,{usd:a.costUsd,ts:a.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 a=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,a);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:a>1,pendingTurns:a,queueDepth:Math.max(0,a-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){pe(e,t);let i=C(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===x)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===x)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===x)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===x)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function We(o){return o==="expo"?"expo":o==="one"||o==="vxrn"?"one":"unknown"}import Je from"http";import Ke from"https";var $="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",$e=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"},suppressBrowserUserAgent:!0}];function je(o){let e=o.toLowerCase();for(let t of $e)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t}function ke(o){let e=je(o.hostname);return{"accept-encoding":"identity",...e?.suppressBrowserUserAgent?{}:{"user-agent":$},...e?.headers}}var Ve=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"]),Ge={"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"},qe=new Set(["host","origin","referer","sec-fetch-site","sec-fetch-mode","sec-fetch-dest"]);function T(o){for(let[e,t]of Object.entries(Ge))o.setHeader(e,t)}function ze(o,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 o.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function Xe(o){let t=(Array.isArray(o)?o[0]:o)?.split(";",1)[0]?.trim().toLowerCase();return t?t.startsWith("text/")||t==="application/json"||t.endsWith("+json")||t==="application/x-www-form-urlencoded"||t==="application/xml"||t.endsWith("+xml")||t==="application/javascript"||t==="application/graphql":!1}function Ye(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(Ve.has(i.toLowerCase())||(t[i]=Array.isArray(s)?s.join(", "):s));return Object.assign(t,e?ke(e):{"user-agent":$}),t}function Ze(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(qe.has(i.toLowerCase())||(t[i]=s));return t.host=e.host,t.origin=e.origin,t.referer=`${e.origin}/`,t}function Ie(o){return o?.startsWith("/__fetch-proxy?")||o?.startsWith("/__proxy?")||!1}function Ce(o){return o?!!(o.startsWith("/__app-api?")||o.startsWith("/__app-api/")):!1}async function Te(o,e){if(o.method==="OPTIONS"){T(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n=Ye(o.headers,s),a;if(o.method!=="GET"&&o.method!=="HEAD"){let d=[];for await(let u of o)d.push(Buffer.isBuffer(u)?u:Buffer.from(u));if(d.length>0){let u=Buffer.concat(d);a=Xe(o.headers["content-type"])?u.toString("utf8"):u}}let r;try{r=await fetch(s.href,{method:o.method,headers:n,body:a,redirect:"follow"})}catch(d){T(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${ze(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)}),T(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 Ee(o,e){let t=o.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(o.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":o.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 a=n.protocol==="https:"?Ke:Je,r=Ze(o.headers,n),c=a.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:o.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":o.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}`)}),o.pipe(c),!0}import{WebSocket as k,WebSocketServer as Qe}from"ws";var et="/__websocket-proxy",tt=new Set(["host","connection","upgrade","transfer-encoding","content-length","sec-websocket-accept","sec-websocket-extensions","sec-websocket-key","sec-websocket-protocol","sec-websocket-version"]);function A(o,e,t){try{o.write(`HTTP/1.1 ${e} ${t}\r
|
|
5
5
|
Connection: close\r
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as M,c as $}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as M,c as $}from"./chunk-TVUKWQKF.js";import{a as j,b as D}from"./chunk-7IY6HRHX.js";import{a as P}from"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import"./chunk-VBQD7ZVI.js";import"./chunk-VNE4KDKB.js";import"./chunk-455VGZ2C.js";import"./chunk-WAC236L6.js";import"./chunk-UQYVIUVV.js";import"./chunk-MBWEZB7G.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import{I as b,K as v}from"./chunk-X25HNIMN.js";import"./chunk-VPPTIGEA.js";import"./chunk-VBHBFJZ3.js";import"./chunk-DXXFRQDT.js";import"./chunk-4GUWBLYM.js";import{execSync as H}from"child_process";import{existsSync as g,readFileSync as I,writeFileSync as w}from"fs";import{join as K,relative as h,resolve as m}from"path";import{existsSync as c,readFileSync as d,readdirSync as W,statSync as A}from"fs";import{basename as N,dirname as V,join as i}from"path";function O(e){let o=e;for(;;){if(c(i(o,"turbo.json"))||c(i(o,"nx.json"))||c(i(o,"lerna.json"))||c(i(o,"pnpm-workspace.yaml")))return o;let n=i(o,"package.json");if(c(n))try{if(JSON.parse(d(n,"utf8")).workspaces)return o}catch{}let t=V(o);if(t===o)break;o=t}return e}function J(e){return c(i(e,"bun.lock"))||c(i(e,"bun.lockb"))?"bun":c(i(e,"pnpm-lock.yaml"))?"pnpm":c(i(e,"yarn.lock"))?"yarn":"npm"}function B(e){if(c(i(e,"turbo.json")))return"turbo";if(c(i(e,"nx.json")))return"nx";if(c(i(e,"pnpm-workspace.yaml")))return"pnpm";let o=i(e,"package.json");if(c(o))try{if(JSON.parse(d(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function G(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function S(e){let o=i(e,"package.json");if(!c(o))return null;let n;try{n=JSON.parse(d(o,"utf8"))}catch{return null}let t={...n.dependencies,...n.devDependencies},r=G(t);return r==="unknown"?null:{dir:e,name:n.name||N(e),framework:r,hasViteConfig:c(i(e,"vite.config.ts"))||c(i(e,"vite.config.js")),hasMetroConfig:c(i(e,"metro.config.js"))||c(i(e,"metro.config.ts")),hasSootsimDependency:!!t.sootsim,devCommand:n.scripts?.dev||null}}function U(e){let o=[],n=i(e,"pnpm-workspace.yaml");if(c(n)){let s=d(n,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(s){let p=s[1].split(`
|
|
3
3
|
`).filter(Boolean);for(let u of p){let a=u.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");a&&o.push(...C(e,a))}}return o}let t=i(e,"package.json");if(c(t))try{let r=JSON.parse(d(t,"utf8")),s=Array.isArray(r.workspaces)?r.workspaces:r.workspaces?.packages||[];for(let p of s)o.push(...C(e,p))}catch{}return o}function C(e,o){let n=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),t=i(e,n);if(!c(t))return[];try{return W(t).map(s=>i(t,s)).filter(s=>{try{return A(s).isDirectory()&&c(i(s,"package.json"))}catch{return!1}})}catch{return[]}}function _(e){let o=B(e),n=J(e);if(o==="single"){let p=S(e);return{root:e,type:o,packageManager:n,apps:p?[p]:[]}}let t=U(e),r=[],s=S(e);s&&r.push(s);for(let p of t){if(p===e)continue;let u=S(p);u&&r.push(u)}return{root:e,type:o,packageManager:n,apps:r}}function R(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function xe(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim setup \u2014 set up this machine and, optionally, this repo
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-4GUWBLYM.js";import*as r from"fs";import*as x from"os";import*as a from"path";import{fileURLToPath as p}from"url";function L(){try{let t=p(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(p(import.meta.url));return a.resolve(t,"../../skills")}}var d=L(),w=new Set(["all","codex","claude"]);function h(){console.log(`sootsim skill
|
|
3
3
|
|
|
4
4
|
install and inspect bundled SootSim agent skills.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as S,e as y,g as v,h as b,i as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as S,e as y,g as v,h as b,i as u}from"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";import{mkdirSync as $,writeFileSync as x}from"node:fs";import{dirname as k,isAbsolute as B,join as C,resolve as E}from"node:path";var z=`
|
|
3
3
|
sootsim slides \u2014 compose App Store screenshots in the live sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as n,B as s,x as o}from"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";function l(){let t=n();console.log(` telemetry is ${t?"ON":"OFF"}`),console.log(` config: ${o()}`);let e=process.env.DO_NOT_TRACK;(e==="1"||e==="true")&&console.log(` note: DO_NOT_TRACK=${e} is set \u2014 telemetry is off for this run`)}async function i(t){let e=t.find(r=>!r.startsWith("-"))?.toLowerCase();switch(e){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${o()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${o()}`);return;default:console.error(` unknown telemetry action: ${e}`),console.error(" usage: sootsim telemetry [on|off|status]"),process.exit(1)}}export{i as runTelemetry};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-4GUWBLYM.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim test \u2014 run tests against sootsim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -26,6 +26,6 @@ examples:
|
|
|
26
26
|
notes:
|
|
27
27
|
playwright is best for smoke and package-local debugging
|
|
28
28
|
--detox is the preferred parity lane for behavior that should match real RN
|
|
29
|
-
`),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-
|
|
29
|
+
`),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-P4ZT3VE5.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-XB73D57F.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
|
|
30
30
|
results: ${a} passed, ${e} failed (${i.length} total)
|
|
31
31
|
`),process.exit(e>0?1:0)}export{v as runTest};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as $}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as $}from"./chunk-WY2T6Z4D.js";import{c as p,e as h,i as R}from"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";var b=12e3;async function j(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim three-mode \u2014 toggle the 3d device stage
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as m,e as d,h as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as m,e as d,h as s}from"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";import{writeFileSync as g}from"fs";function u(){console.log(`
|
|
3
3
|
sootsim timeline \u2014 control the semantic event timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-XCQ5SHW4.js";import"./chunk-PHPGJPFL.js";import"./chunk-NXOSVZ5V.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import{G as i}from"./chunk-X25HNIMN.js";import{a as e}from"./chunk-VPPTIGEA.js";import"./chunk-4GUWBLYM.js";import{spawn as r}from"node:child_process";var a="https://registry.npmjs.org/sootsim/latest";async function h(o){let n=o.indexOf("--channel"),t=n>=0&&o[n+1]?o[n+1]:void 0;console.log(`sootsim upgrade
|
|
3
3
|
`),await c(),console.log(`
|
|
4
4
|
runtime:`),await s(["install",...t?["--channel",t]:[]],{})}async function c(){let o=e(),n=await u();if(!n){console.log(` cli: v${o} \u2014 couldn't reach the npm registry, skipped`);return}if(i(n,o)<=0){console.log(` cli: v${o} (latest)`);return}console.log(` cli: v${o} \u2192 v${n} \u2014 installing globally\u2026`),await m(n)?console.log(` cli: installed v${n} \u2014 restart any running \`sootsim\` process to pick it up`):(console.log(" cli: automatic install failed \u2014 upgrade it yourself with:"),console.log(" npm install -g sootsim@latest"))}async function u(){try{let o=await fetch(a,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!o.ok)return null;let n=await o.json();return typeof n.version=="string"&&n.version?n.version:null}catch{return null}}function m(o){return new Promise(n=>{let t=r("npm",["install","-g",`sootsim@${o}`],{stdio:"inherit",shell:!0});t.on("error",()=>n(!1)),t.on("exit",l=>n(l===0))})}export{h as runUpgrade};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-JFDRB2AQ.js";import"./chunk-RYOEWY42.js";import"./chunk-FSWR7SL3.js";import"./chunk-IE7FPLMT.js";import"./chunk-NXOSVZ5V.js";import"./chunk-JXIJPGAA.js";import"./chunk-KW2G6CYT.js";import"./chunk-DFOAKJLV.js";import"./chunk-EXA5KQMJ.js";import"./chunk-6OJJAJRM.js";import"./chunk-X25HNIMN.js";import"./chunk-4GUWBLYM.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as s,d as l,h as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.181 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as s,d as l,h as r}from"./chunk-PHPGJPFL.js";import{a as i}from"./chunk-VNE4KDKB.js";import"./chunk-X25HNIMN.js";import{a as t}from"./chunk-VPPTIGEA.js";import"./chunk-4GUWBLYM.js";async function d(u){let{IS_BETA:a,BETA_LABEL:m}=await import("./beta-VXVNIBH6.js"),c=a?` \xB7 ${m}`:"";console.log(`sootsim v${t()}${c}`);let o=i(),e=l();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${e}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `sootsim runtime install`"):console.log(`${o.primary} \xB7 ${e}`);let n=await r({channel:e});n.outdated&&n.latest&&console.log(`
|
|
3
3
|
\u2191 runtime v${n.latest} available \u2014 run \`sootsim upgrade\``),console.log(`
|
|
4
4
|
what's new: ${s}`)}export{d as runVersion};
|