sootsim 0.1.93 → 0.1.94
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-L6HIJY56.js → agent-M7RAMCNX.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-E46RJGKZ.js → agent-wrapper-PTLNDZIV.js} +2 -2
- package/dist-cli/chunks/{assert-E35SQTDG.js → assert-YAT25Y3H.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-HF7EKSU2.js +2 -0
- package/dist-cli/chunks/beta-SCGMBTQ5.js +2 -0
- package/dist-cli/chunks/{chunk-TRS52XH4.js → chunk-2XKL5RLB.js} +1 -1
- package/dist-cli/chunks/{chunk-3IFMI2MH.js → chunk-3E6FBC2C.js} +1 -1
- package/dist-cli/chunks/{chunk-HVOCWWIV.js → chunk-3MX5JSRS.js} +1 -1
- package/dist-cli/chunks/{chunk-6MKI2ZHC.js → chunk-3UEJ3RWP.js} +2 -2
- package/dist-cli/chunks/{chunk-S3QCEBTB.js → chunk-472HN3BK.js} +2 -2
- package/dist-cli/chunks/{chunk-BXZDXBUA.js → chunk-4DNBWN6P.js} +1 -1
- package/dist-cli/chunks/{chunk-LWCVNHLT.js → chunk-5BE3UOTI.js} +2 -2
- package/dist-cli/chunks/chunk-6XEH2MEP.js +2 -0
- package/dist-cli/chunks/{chunk-CCKZR7BU.js → chunk-7J44DVNM.js} +2 -2
- package/dist-cli/chunks/{chunk-JLEZDTOL.js → chunk-7YYWQLZP.js} +3 -3
- package/dist-cli/chunks/{chunk-M5P3ULHQ.js → chunk-AUGTM3TS.js} +2 -2
- package/dist-cli/chunks/{chunk-DSHYPD5A.js → chunk-BXUPVWJF.js} +2 -2
- package/dist-cli/chunks/{chunk-FGWNYFSK.js → chunk-CVVBWYIK.js} +1 -1
- package/dist-cli/chunks/{chunk-FRFSAMOW.js → chunk-EDS7NL4H.js} +2 -2
- package/dist-cli/chunks/{chunk-4DUFZAOO.js → chunk-EUM2HB3Y.js} +2 -2
- package/dist-cli/chunks/{chunk-352UPR2W.js → chunk-F3L5HOVI.js} +2 -2
- package/dist-cli/chunks/{chunk-C343OFIG.js → chunk-HEBLQBQS.js} +2 -2
- package/dist-cli/chunks/{chunk-3NEAT5UU.js → chunk-HIY6523U.js} +2 -2
- package/dist-cli/chunks/{chunk-2JFC45SX.js → chunk-HKVGNJOC.js} +2 -2
- package/dist-cli/chunks/{chunk-I4M7NBKY.js → chunk-HLJHNSKT.js} +3 -3
- package/dist-cli/chunks/{chunk-EOEORGPV.js → chunk-HXZ6J5HD.js} +1 -1
- package/dist-cli/chunks/chunk-LMQY4XBR.js +1 -0
- package/dist-cli/chunks/chunk-MKKNJKVS.js +1 -0
- package/dist-cli/chunks/{chunk-6T6RZPWU.js → chunk-MLJDJXUD.js} +3 -3
- package/dist-cli/chunks/{chunk-WPPSP6UG.js → chunk-NPTDV7YK.js} +1 -1
- package/dist-cli/chunks/{chunk-IAR2LAOG.js → chunk-ONO5OMYX.js} +2 -2
- package/dist-cli/chunks/{chunk-WTUKAQUP.js → chunk-PQHPXCCH.js} +2 -2
- package/dist-cli/chunks/{chunk-K4DWGJO2.js → chunk-PTCJK7ZE.js} +2 -2
- package/dist-cli/chunks/{chunk-TZFDBDEI.js → chunk-R6PGKL6I.js} +1 -1
- package/dist-cli/chunks/{chunk-JLFCHU45.js → chunk-RNSKQUT4.js} +2 -2
- package/dist-cli/chunks/{chunk-D62KWBZG.js → chunk-S5EUXMN4.js} +2 -2
- package/dist-cli/chunks/{chunk-IQJE2PBU.js → chunk-T23UC7RN.js} +12 -12
- package/dist-cli/chunks/{chunk-F5FIYZXA.js → chunk-TJ6ZITBM.js} +2 -2
- package/dist-cli/chunks/{chunk-M4QXOCCY.js → chunk-UFLVNYH3.js} +1 -1
- package/dist-cli/chunks/{chunk-W5ET7GSK.js → chunk-UL6LFMI4.js} +1 -1
- package/dist-cli/chunks/{chunk-DIWDDWNK.js → chunk-UUCEMGVS.js} +1 -1
- package/dist-cli/chunks/{chunk-YQRBB7YC.js → chunk-UZHXQBY4.js} +2 -2
- package/dist-cli/chunks/chunk-WZQSLKTI.js +1 -0
- package/dist-cli/chunks/{chunk-XPLBMRUI.js → chunk-XMG5F53U.js} +1 -1
- package/dist-cli/chunks/{chunk-WVNXRYKC.js → chunk-YCQN6MHW.js} +2 -2
- package/dist-cli/chunks/chunk-YEU6U2YQ.js +2 -0
- package/dist-cli/chunks/{chunk-XFBHJCF3.js → chunk-YYPERQHF.js} +1 -1
- package/dist-cli/chunks/{chunk-RVUQAUXP.js → chunk-ZTGFYWL7.js} +1 -1
- package/dist-cli/chunks/cli-version-3SC3TSX4.js +2 -0
- package/dist-cli/chunks/{compat-E6YM3TJZ.js → compat-IF3WVFKU.js} +3 -3
- package/dist-cli/chunks/{config-5QYHIZDT.js → config-5PE3GY7X.js} +2 -2
- package/dist-cli/chunks/{control-JIXJTCK4.js → control-WP3B2MU2.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-M3TNUJW3.js → cpu-profile-U27T424I.js} +2 -2
- package/dist-cli/chunks/{daemon-POLLGYA2.js → daemon-DCM4KUJG.js} +2 -2
- package/dist-cli/chunks/{debug-P6IGEYZR.js → debug-PKIDQJP6.js} +3 -3
- package/dist-cli/chunks/{detox-HIP5JDSQ.js → detox-EY4KHCAU.js} +2 -2
- package/dist-cli/chunks/{device-GL2LVHJD.js → device-7IIDFJXR.js} +2 -2
- package/dist-cli/chunks/{diagnose-JGJF6QJ2.js → diagnose-DGIZWXBH.js} +2 -2
- package/dist-cli/chunks/drivers-CAWI7MAN.js +2 -0
- package/dist-cli/chunks/{electron-HO2O3U5S.js → electron-QUUDZTYD.js} +3 -3
- package/dist-cli/chunks/flow-5WYK7JI3.js +2 -0
- package/dist-cli/chunks/help-U73NSRKP.js +2 -0
- package/dist-cli/chunks/{hints-K5KHWU2I.js → hints-BSCOTH5N.js} +2 -2
- package/dist-cli/chunks/{home-paths-VTUAIJ4X.js → home-paths-GOPKMRL6.js} +2 -2
- package/dist-cli/chunks/{inspect-5QTZ4446.js → inspect-LUXU5CQ6.js} +3 -3
- package/dist-cli/chunks/install-U6DA6KUK.js +2 -0
- package/dist-cli/chunks/{install-desktop-P5IOBTJA.js → install-desktop-SDQGXG6R.js} +3 -3
- package/dist-cli/chunks/{keys-H65MGEIF.js → keys-K4FYFEQA.js} +2 -2
- package/dist-cli/chunks/{launch-LGV3G4IE.js → launch-3Y6DVYAF.js} +3 -3
- package/dist-cli/chunks/{login-SXC6PXZA.js → login-QBT45BVK.js} +4 -4
- package/dist-cli/chunks/{logout-JQVXXJQJ.js → logout-MKTOHRRA.js} +2 -2
- package/dist-cli/chunks/{maestro-LLK45LHK.js → maestro-5EDCA6DV.js} +2 -2
- package/dist-cli/chunks/{preview-PCHLQQWW.js → preview-CSC3NAEC.js} +2 -2
- package/dist-cli/chunks/{profile-5SUWLDAA.js → profile-EFTJ22G2.js} +2 -2
- package/dist-cli/chunks/{react-ASFY75YW.js → react-WC3SQP7Q.js} +2 -2
- package/dist-cli/chunks/{record-NYEORAUL.js → record-4S2CGFHP.js} +2 -2
- package/dist-cli/chunks/runtime-HYVK4U3U.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-YQVEY753.js → runtime-delivery-7IJOBXGI.js} +2 -2
- package/dist-cli/chunks/{screenshot-GCT4HM3M.js → screenshot-LDBGLZLM.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-AV2UYPI2.js → screenshot-mode-EZH5DT3V.js} +2 -2
- package/dist-cli/chunks/{screenshots-25JTW3MK.js → screenshots-UYY3NGFZ.js} +2 -2
- package/dist-cli/chunks/{server-EMV5ZU3B.js → server-HU3OGBJR.js} +2 -2
- package/dist-cli/chunks/setup-repo-LUOVCOG4.js +2 -0
- package/dist-cli/chunks/{skills-2MLJI75W.js → skills-PEX34JXX.js} +2 -2
- package/dist-cli/chunks/{start-4MINIBCZ.js → start-RCSXICZG.js} +4 -4
- package/dist-cli/chunks/store-OVN46YZR.js +2 -0
- package/dist-cli/chunks/telemetry-WAFBBGFV.js +2 -0
- package/dist-cli/chunks/{test-662YO2IZ.js → test-B46TSD3A.js} +3 -3
- package/dist-cli/chunks/{three-mode-VPDWTIYX.js → three-mode-ZKUF2FE4.js} +2 -2
- package/dist-cli/chunks/{timeline-4UOJQCTI.js → timeline-6HLHZHRB.js} +2 -2
- package/dist-cli/chunks/{upgrade-NV4PNXNY.js → upgrade-NJYGRNLD.js} +2 -2
- package/dist-cli/chunks/upload-FDYUCVEQ.js +2 -0
- package/dist-cli/chunks/{web-6VVCC7QO.js → web-VFB5EBMG.js} +2 -2
- package/dist-cli/chunks/{what-happened-C7OMH2CO.js → what-happened-TLMF5LRQ.js} +2 -2
- package/dist-cli/chunks/{whoami-PO5M2KCL.js → whoami-QJKD2QRF.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 +8 -10
- 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/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/demo-app-registry.cjs +8 -10
- package/dist-lib/scripts/dev-server-scanner.cjs +8 -10
- package/dist-lib/skills.cjs +9 -11
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/scripts/demo-app-registry.ts +9 -8
- package/dist-cli/chunks/auto-bootstrap-KTVZAENF.js +0 -2
- package/dist-cli/chunks/beta-AMLREMEK.js +0 -2
- package/dist-cli/chunks/chunk-ALNQTDSH.js +0 -1
- package/dist-cli/chunks/chunk-G2SZI7US.js +0 -2
- package/dist-cli/chunks/chunk-IWEKZVXW.js +0 -2
- package/dist-cli/chunks/chunk-K3A7IH77.js +0 -1
- package/dist-cli/chunks/chunk-QHPFVK62.js +0 -1
- package/dist-cli/chunks/cli-version-KG6WCABJ.js +0 -2
- package/dist-cli/chunks/drivers-4CENGVIM.js +0 -2
- package/dist-cli/chunks/flow-HC36VZGL.js +0 -2
- package/dist-cli/chunks/help-57FSVG47.js +0 -2
- package/dist-cli/chunks/install-QHY443P7.js +0 -2
- package/dist-cli/chunks/runtime-KZJNKYOB.js +0 -2
- package/dist-cli/chunks/setup-repo-MHZ7ELJO.js +0 -2
- package/dist-cli/chunks/store-NKMSNUBC.js +0 -2
- package/dist-cli/chunks/telemetry-IJO3ZRR5.js +0 -2
- package/dist-cli/chunks/upload-AJURIKDZ.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l}from"./chunk-RNSKQUT4.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-UFLVNYH3.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-HYVK4U3U.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
|
|
3
3
|
dev checkouts skip the auto-install of the persistent launchd / systemd
|
|
4
4
|
agent. start the daemon manually in another shell with:
|
|
5
5
|
bun sootsim server
|
|
6
|
-
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-
|
|
6
|
+
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-DCM4KUJG.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
|
|
7
7
|
if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as d}from"./chunk-RNSKQUT4.js";import{a as p,d as w,h as $,j as y}from"./chunk-HKVGNJOC.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-UFLVNYH3.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
|
|
3
3
|
sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -22,4 +22,4 @@ examples:
|
|
|
22
22
|
sootsim runtime install 1.2.3
|
|
23
23
|
sootsim runtime install --channel beta
|
|
24
24
|
sootsim runtime use 1.2.3
|
|
25
|
-
`)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-
|
|
25
|
+
`)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-GOPKMRL6.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as C,mkdirSync as D,readFileSync as O,rmSync as s,writeFileSync as g}from"fs";import{tmpdir as P}from"os";import{dirname as R,join as A,resolve as x}from"path";import{execFileSync as a}from"child_process";import{readFileSync as I}from"fs";import{createRequire as S}from"module";var o=null;function u(r){o||(o=_());try{return o(r)}catch{return null}}function _(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=E();return n||T()}return()=>null}function y(){return r=>{try{let n=I(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,b=16;function E(){if(!process.versions?.bun)return null;try{let r=S(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return m=>{if(Number(i.symbols.proc_pidinfo(m,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(b);return p>0?p:null}}catch{return null}}function T(){return r=>{try{let t=a("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",v=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function F(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of v){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=F(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function l(){if(process.env[f])return x(process.env[f]);let r=L();return A(P(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!C(r))return null;try{let n=JSON.parse(O(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function J(){return h()?.simId||null}function j(r){let n=r.trim();if(!n)return;let t=l();D(R(t),{recursive:!0}),g(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
4
4
|
`)}function K(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as ue,e as de,f as pe}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as ue,e as de,f as pe}from"./chunk-TJ6ZITBM.js";import{c as le,e as ce,g as I}from"./chunk-RNSKQUT4.js";import{d as ae}from"./chunk-3E6FBC2C.js";import{a as ie,b as P}from"./chunk-AUGTM3TS.js";import{a as se}from"./chunk-5BE3UOTI.js";import{createHash as he}from"crypto";import{readFileSync as G}from"fs";import{gzipSync as ye}from"zlib";function fe(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}function D(e,t){let r=new AbortController,o=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(o)}}async function ke(e){let t=D(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let o=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${o.slice(0,200)}`)}}async function Ee(e,t=8,r){let o=0,s=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;o<a;){let l=e[o++];await ke(l),s++,r?.(s,a)}}))}function Fe(e,t,r,o){let s=[];s.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let l=r.get(a.urlhash);l&&s.push({url:a.putUrl,contentType:a.contentType,bytes:l})}e.events&&o?.eventsBytes&&s.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:o.eventsBytes}),e.flowVideo&&o?.videoBytes&&s.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:o.videoBytes}),e.storage&&o?.storageBytes&&s.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:o.storageBytes});for(let a of e.snapshots??[]){let l=o?.snapshotBytes?.get(a.id);l&&s.push({url:a.putUrl,contentType:a.contentType,bytes:l})}return s}function Le(e){return e.replace(/\/+$/,"")}var A=class extends Error{constructor(r,o,s,a=""){super(r);this.status=o;this.phase=s;this.responseText=a;this.name="PresignedUploadError"}};async function ge(e){let t=Le(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let o=D(3e4,"init"),s;try{s=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:o.signal})}finally{o.cancel()}if(!s.ok){let f=await s.text().catch(()=>"");throw new A(`init failed: ${s.status} ${f.slice(0,200)}`,s.status,"init",f)}let a=await s.json(),l=Fe(a,e.bundleBytes,e.filesByHash,e.extras);await Ee(l,e.concurrency??8,e.onPutProgress);let y=D(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!d.ok){let f=await d.text().catch(()=>"");throw new A(`finalize failed: ${d.status} ${f.slice(0,200)}`,d.status,"finalize",f)}let $=await d.json();return{init:a,finalize:$}}function Ae(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ve=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",J="http://localhost:3000";async function ze(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${J}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return J}catch{}return be}function _(e){return e.replace(/\/$/,"")}function He(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function Me(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Ce(e,t){return t?_(t):process.env.SOOTSIM_PREVIEW_ORIGIN?_(process.env.SOOTSIM_PREVIEW_ORIGIN):He(e)?_(e):Me(e)?_(ve):_(e)}function Ne(){console.log(`
|
|
3
3
|
sootsim upload \u2014 publish the current recorded bundle as a /preview/<id> link
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p}from"./chunk-ONO5OMYX.js";import{d as c,e as l}from"./chunk-TJ6ZITBM.js";import{a}from"./chunk-5BE3UOTI.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
|
|
3
3
|
sootsim ${e} needs auth before it can check recording access.
|
|
4
4
|
|
|
5
5
|
pick one:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as i,e as d,h as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as i,e as d,h as c}from"./chunk-RNSKQUT4.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(t.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(o)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function t(_){return`(async () => {
|
|
3
3
|
const __t = window.__sootsimTest
|
|
4
4
|
if (!__t) throw new Error('__sootsimTest not available')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as k,c as T,e as C}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as k,c as T,e as C}from"./chunk-NPTDV7YK.js";import{E as v,F as P}from"./chunk-UFLVNYH3.js";import{WebSocket as I}from"ws";function x(){let e=v();return e&&P(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(t,i){super(t),this.name="BridgeSimLockedError",this.lock=i}};function $(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function R(e,t={}){let i=new Set,a=t.port??x(),l=t.commandTimeoutMs??15e3,r,m="none",p=new Set(t.stripBooleanFlags??[]),b=new Set(t.stripValueFlags??[]);for(let n=0;n<e.length;n++){let d=e[n];if(d==="--port"||d==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(d.startsWith("--port=")){i.add(n),a=Number(d.slice(7));continue}if(d==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),l=Number(e[n+1])),n++;continue}if(d==="--sim"||d==="--session"||d==="--tab"){i.add(n),n+1<e.length&&(i.add(n+1),r=e[n+1]?.trim()||void 0,m="flag"),n++;continue}let s=d.startsWith("--sim=")?d.slice(6):d.startsWith("--session=")?d.slice(10):d.startsWith("--tab=")?d.slice(6):void 0;if(s!==void 0){i.add(n),r=s.trim()||void 0,m="flag";continue}if(p.has(d)){i.add(n);continue}b.has(d)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!r){let n=T();n&&(r=n.trim()||void 0,m="saved")}return{positional:e.filter((n,d)=>!i.has(d)),wsPort:a,simId:r,simIdSource:m,commandTimeoutMs:l}}function E(e,t={}){let i=1,a=t.commandTimeoutMs??15e3,l=new Map,r=new I(`ws://localhost:${e}`),m=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:k(),p=new Promise((s,o)=>{r.on("open",()=>{try{r.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:m.key,cliIdentitySource:m.source,cliLabel:t.cliLabel}))}catch{}s()}),r.on("error",c=>{let g=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${g}`))})}),b=!1,n=!1;function d(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",g=$(o?t.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${g})
|
|
3
3
|
`)}return r.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o.i>0&&!b&&(b=!0,process.stderr.write(`
|
|
4
4
|
\u26A0 ${o.i} other CLI identity/identities are driving this sim
|
|
5
5
|
taps, scrolls, and keyboard input from multiple agents will collide on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as Ns}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as Ns}from"./chunk-HXZ6J5HD.js";var ui=`(async () => {
|
|
3
3
|
try { localStorage.clear() } catch {}
|
|
4
4
|
try { sessionStorage.clear() } catch {}
|
|
5
5
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as x}from"./chunk-HXZ6J5HD.js";var J="sootsimConfig";function h(e){return!!e&&Object.keys(e).length>0}function de(e){return e?h(e.modules)||h(e.turboModules)||h(e.nativeModules)||h(e.env)||h(e.settings)||h(e.initialState):!1}function V(e,t){let n=new URL(e);return de(t)?n.searchParams.set(J,JSON.stringify(t)):n.searchParams.delete(J),n.toString()}import{existsSync as d,readFileSync as R,writeFileSync as g}from"node:fs";import{homedir as le}from"node:os";import{dirname as fe,join as c,resolve as y}from"node:path";var _=le();function me(e){let t=e;for(;;){if(d(c(t,"pnpm-workspace.yaml"))||d(c(t,"turbo.json"))||d(c(t,"nx.json"))||d(c(t,"lerna.json")))return t;let n=c(t,"package.json");if(d(n))try{if(JSON.parse(R(n,"utf8")).workspaces)return t}catch{}let r=fe(t);if(r===t)return null;t=r}}function O(e,t){let n=me(process.cwd()),r=[n?y(n,e):null,y(process.cwd(),e),y(process.cwd(),t)].filter(o=>!!o);for(let o of r)if(d(o))return o;return r[0]??y(process.cwd(),e)}var pe=()=>O("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),_e=()=>O("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),ge=()=>O("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),Re=()=>O("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),W=()=>O("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),Ee=()=>O("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),B={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},Se=c(_,"github/mattermost-mobile"),N=c(_,"github/uniswap-interface"),Ae=c(N,"apps/mobile"),C=c(N,".env.defaults.local"),he="stored-in-.env.local",q="# sootsim demo env overrides",Pe=c(N,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),Oe=c(N,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),Q="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function X(e){if(!d(e))return{};let t={},n=R(e,"utf8");for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o||o.startsWith("#"))continue;let a=o.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!a)continue;let i=a[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[a[1]]=i}return t}function $(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(he)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function z(e,t){for(let n of e)for(let r of t){let o=n[r];if($(o))return o.trim()}}function oe(){let e=X(C),t=X(c(N,"apps/web/.env")),n=[process.env,e,t],r={},o=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,s]of o){let u=z(n,[i,...s]);if(u){r[i]=u;for(let l of s)r[l]=u}}if(!($(r.TRADING_API_KEY)&&$(r.UNISWAP_API_KEY))){let i=z(n,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";r.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",r.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",r.GRAPHQL_URL_OVERRIDE=i,r.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",r.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return r}function Te(){let e=d(C)?R(C,"utf8"):"";if(e&&!e.includes(q))return;let t=oe(),n=[q];for(let[r,o]of Object.entries(t).sort(([a],[i])=>a.localeCompare(i)))n.push(`${r}=${JSON.stringify(o)}`);n.push(""),g(C,`${n.join(`
|
|
3
3
|
`)}
|
|
4
|
-
`)}function
|
|
4
|
+
`)}function ve(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
|
|
5
5
|
`,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
|
|
6
6
|
return 'not-required'
|
|
7
7
|
|
|
@@ -19,8 +19,8 @@ import{a as x}from"./chunk-EOEORGPV.js";var j="sootsimConfig";function h(e){retu
|
|
|
19
19
|
return 'not-required'
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
`,i=(s,u,l,f)=>{let m=R(s,"utf8");if(!m.includes(l)){if(m.includes(f)){g(s,m.replace(f,l));return}if(!m.includes(u))throw new Error(`uniswap demo patch failed: expected snippet not found in ${s}`);g(s,m.replace(u,`${u}${l}`))}};i(Pe,e,t,n),i(Oe,r,o,a)}var S=c(_,"github/joplin"),
|
|
23
|
-
`)}}var Z=["packages/lib/models/Setting.js","packages/turndown/lib/turndown.cjs.js","packages/app-mobile/pluginAssets/index.js"];function we(){if(!d(S)||Z.filter(r=>!d(c(S,r))).length===0)return;let{execSync:t}=x("node:child_process");t("yarn buildParallel",{cwd:S,stdio:"inherit",env:{...process.env,NO_FLIPPER:"1",CI:""}});let n=Z.filter(r=>!d(c(S,r)));if(n.length>0)throw new Error(`joplin demo: yarn buildParallel did not produce: ${n.join(", ")}`)}var P=c(_,"github/rainbow"),
|
|
22
|
+
`,i=(s,u,l,f)=>{let m=R(s,"utf8");if(!m.includes(l)){if(m.includes(f)){g(s,m.replace(f,l));return}if(!m.includes(u))throw new Error(`uniswap demo patch failed: expected snippet not found in ${s}`);g(s,m.replace(u,`${u}${l}`))}};i(Pe,e,t,n),i(Oe,r,o,a)}var S=c(_,"github/joplin"),Ie=c(S,"packages/app-mobile"),Ne=["packages/lib","packages/renderer","packages/turndown","packages/turndown-plugin-gfm","packages/editor","packages/tools","packages/utils","packages/fork-htmlparser2","packages/fork-uslug","packages/fork-sax","packages/htmlpack","packages/react-native-saf-x","packages/react-native-alarm-notification"];function be(){if(d(S))for(let e of Ne){let t=c(S,e);if(!d(t))continue;let n=c(t,".watchmanconfig");d(n)||g(n,`{}
|
|
23
|
+
`)}}var Z=["packages/lib/models/Setting.js","packages/turndown/lib/turndown.cjs.js","packages/app-mobile/pluginAssets/index.js"];function we(){if(!d(S)||Z.filter(r=>!d(c(S,r))).length===0)return;let{execSync:t}=x("node:child_process");t("yarn buildParallel",{cwd:S,stdio:"inherit",env:{...process.env,NO_FLIPPER:"1",CI:""}});let n=Z.filter(r=>!d(c(S,r)));if(n.length>0)throw new Error(`joplin demo: yarn buildParallel did not produce: ${n.join(", ")}`)}var P=c(_,"github/rainbow"),v=c(P,"src/graphql"),Y=c(v,"config.js"),D=c(P,"src/references/networks.json"),I="https://metadata.p.rainbow.me",F=9011,K=`http://127.0.0.1:${F}`,ee="https://api.thegraph.com/subgraphs/name/ensdomains/ens",se="0x0000000000000000000000000000000000000000",ye="https://relay.rainbow.me",Ce="sootsim-rainbow-demo-master-key-do-not-use-for-real-wallets",De="https://rpc.rainbow.me/v1",Le="",ie={1:"https://ethereum-rpc.publicnode.com"},te="sootsim-rainbow-demo-api-key",ke="0x736f6f7473696d2d7261696e626f772d64656d6f2d686173682d6b6579000000",Ue="00000000000000000000000000000000",Me=["src/graphql/__generated__/ens.ts","src/graphql/__generated__/metadata.ts","src/graphql/__generated__/metadataPOST.ts"];function G(e,t){let{execSync:n}=x("node:child_process");n(e,{cwd:t,stdio:"inherit",env:{...process.env,METADATA_BASE_URL:I,RAINBOW_RELAY_QUOTE_SIGNER:process.env.RAINBOW_RELAY_QUOTE_SIGNER??se}})}function xe(){if(!d(v))return;let e=d(Y)?R(Y,"utf8"):"";e.includes(ee)&&e.includes(I)||g(Y,`exports.config = {
|
|
24
24
|
ens: {
|
|
25
25
|
__name: 'ens',
|
|
26
26
|
document: './queries/ens.graphql',
|
|
@@ -32,12 +32,12 @@ import{a as x}from"./chunk-EOEORGPV.js";var j="sootsimConfig";function h(e){retu
|
|
|
32
32
|
metadata: {
|
|
33
33
|
__name: 'metadata',
|
|
34
34
|
document: './queries/metadata.graphql',
|
|
35
|
-
schema: { method: 'GET', url: '${
|
|
35
|
+
schema: { method: 'GET', url: '${I}/v1/graph' },
|
|
36
36
|
},
|
|
37
37
|
metadataPOST: {
|
|
38
38
|
__name: 'metadataPOST',
|
|
39
39
|
document: './queries/metadata.graphql',
|
|
40
|
-
schema: { method: 'POST', url: '${
|
|
40
|
+
schema: { method: 'POST', url: '${I}/v1/graph' },
|
|
41
41
|
},
|
|
42
42
|
arc: {
|
|
43
43
|
__name: 'arc',
|
|
@@ -60,8 +60,8 @@ import{a as x}from"./chunk-EOEORGPV.js";var j="sootsimConfig";function h(e){retu
|
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
|
-
`)}function
|
|
64
|
-
`)}function
|
|
65
|
-
`)){let a=o.trim().split(/\s+/);if(a.length<9)continue;let i=Number(a[1]),u=a[8].match(/:(\d+)$/);if(!u)continue;let l=Number(u[1]);H(l,t)&&(r.has(l)||r.set(l,i))}if(r.size>0)return[...r.entries()].map(([o,a])=>({port:o,pid:a}))}}catch{}try{let{stdout:n}=await
|
|
66
|
-
`)){let a=o.match(/:(\d+)\s/),i=o.match(/pid=(\d+)/);if(!a)continue;let s=Number(a[1]),u=i?Number(i[1]):0;H(s,t)&&(r.has(s)||r.set(s,u))}if(r.size>0)return[...r.entries()].map(([o,a])=>({port:o,pid:a}))}}catch{}return
|
|
67
|
-
`))if(r.startsWith("n")&&r.length>1){let o=r.slice(1).trim();if(o)return M.set(e,o),o}}catch{}return null}function
|
|
63
|
+
`)}function We(){let e={ENABLE_DEV_MODE:"1",IS_TESTING:"false",METADATA_BASE_URL:process.env.RAINBOW_METADATA_BASE_URL??K,ADDYS_API_KEY:process.env.ADDYS_API_KEY??te,ADDYS_BASE_URL:process.env.ADDYS_BASE_URL??K,PLATFORM_API_KEY:process.env.PLATFORM_API_KEY??te,PLATFORM_BASE_URL:process.env.PLATFORM_BASE_URL??K,RAINBOW_MASTER_KEY:process.env.RAINBOW_MASTER_KEY??Ce,RAINBOW_RELAY_QUOTE_SIGNER:process.env.RAINBOW_RELAY_QUOTE_SIGNER??se,RAINBOW_RELAY_URL:process.env.RAINBOW_RELAY_URL??ye,RPC_PROXY_API_KEY_PROD:Le,RPC_PROXY_BASE_URL_PROD:process.env.RAINBOW_RPC_PROXY_BASE_URL??process.env.RPC_PROXY_BASE_URL_PROD??De,SECURE_WALLET_HASH_KEY:process.env.SECURE_WALLET_HASH_KEY??ke,WC_PROJECT_ID:process.env.WC_PROJECT_ID??process.env.RAINBOW_WALLETCONNECT_PROJECT_ID??Ue},t=["ADDYS_API_KEY","ADDYS_BASE_URL","IMGIX_DOMAIN","IMGIX_TOKEN","PLATFORM_API_KEY","PLATFORM_BASE_URL","RAINBOW_TEST_WALLET","RAINBOW_RELAY_API_KEY","RAINBOW_RELAY_URL","SECURE_WALLET_HASH_KEY","TOKEN_SEARCH_URL"];for(let n of t){let r=process.env[n];r&&(e[n]=r)}return e}function Be(){if(!d(D))return;let e=JSON.parse(R(D,"utf8"));if(!Array.isArray(e.networks))return;let t=!1;for(let n of e.networks){let r=n.id?ie[n.id]:void 0;!r||!n.defaultRPC||n.defaultRPC.url!==r&&(n.defaultRPC.url=r,t=!0)}t&&g(D,`${JSON.stringify(e)}
|
|
64
|
+
`)}function Ye(){if(!d(P))return;xe(),d(c(v,"node_modules/.bin/graphql-codegen"))||G("fnm exec --using=22 yarn install",v),Me.some(t=>!d(c(P,t)))&&G("fnm exec --using=22 yarn codegen",v),d(D)||G("fnm exec --using=22 yarn fetch:networks",P),Be()}var p=c(_,"github/eigen"),L=c(p,"keys.shared.json"),ne=c(p,"metaflags.json"),re=c(p,"src/__generated__/.relay-complete");function Ke(){if(d(L))try{let e=JSON.parse(R(L,"utf8"));if(!e||typeof e!="object")return;let t=e.secure&&typeof e.secure=="object"?e.secure:void 0,n=e.public&&typeof e.public=="object"?e.public:void 0;return!t&&!n?void 0:{secure:t,public:n}}catch{return}}function Ge(){let e=process.env.SOOTSIM_ARTSY_EMAIL??process.env.MAESTRO_TEST_EMAIL,t=process.env.SOOTSIM_ARTSY_PASSWORD??process.env.MAESTRO_TEST_PASSWORD,n=Ke(),r={};if(e&&t&&(r.SOOTSIM_LAUNCH_ARGUMENTS=JSON.stringify({email:e,password:t,useMaestroInit:!0})),n&&(r.SOOTSIM_REACT_NATIVE_KEYS_JSON=JSON.stringify(n)),Object.keys(r).length!==0)return{env:r}}function $e(){if(!d(p))return;let{execSync:e}=x("node:child_process"),t=c(p,".yarn/releases/yarn-4.10.3.cjs");if(d(t)){let r=R(t,"utf8"),o='["clone","-c core.autocrlf=false",';r.includes(o)&&g(t,r.replace(o,'["clone","-c","core.autocrlf=false",'))}if(d(c(p,"node_modules/.yarn-state.yml"))||e("yarn install",{cwd:p,stdio:"inherit",env:{...process.env,YARN_CHECKSUM_BEHAVIOR:"update"}}),!d(L)||!d(ne))try{e("yarn setup:oss",{cwd:p,stdio:"inherit"})}catch{if(!d(L)||!d(ne))throw new Error("artsy demo: setup:oss did not create keys/metaflags")}let n=c(p,"node_modules/react-native-launch-arguments/package.json");if(d(n)){let r=R(n,"utf8");r.includes('"dist/index.js"')&&g(n,r.replace('"dist/index.js"','"src/index.ts"'))}d(re)||(e("yarn relay",{cwd:p,stdio:"inherit"}),g(re,""))}var ae=[{name:"bluesky",label:"Bluesky",dir:c(_,"github/bluesky"),preferredPort:8082,framework:"expo",command:e=>({cmd:`npx expo start --port ${e}`}),credentials:{envVars:["SOOTSIM_BLUESKY_PASSWORD"],known:{HANDLE:"natew.bsky.social"}}},{name:"3pc",label:"3PunchConvo",dir:c(_,"lightstrike-labs/three-punch-convo-app/apps/one"),preferredPort:8081,framework:"one",command:e=>({cmd:"npx one dev",env:{ONE_PORT:String(e)}})},{name:"uniswap",label:"Uniswap",dir:Ae,preferredPort:8085,framework:"expo",prepare:()=>{Te(),ve()},command:e=>({cmd:`npx expo start --clear --port ${e}`,env:oe()})},{name:"takeout",label:"Takeout",dir:c(_,"takeout"),preferredPort:8086,framework:"one",readyTimeoutMs:24e4,managedPorts:e=>{let t=e-8081;return[5433+t,4848+t,9200+t]},command:e=>({cmd:"bun lite:demo",env:{TAKEOUT_ENV_MODE:"development",PORT_OFFSET:String(e-8081),OREZ_DATA_DIR:`${_}/.cache/sootsim-demo/takeout-orez`,VITE_DEMO_MODE:"1",ZERO_APP_ID:"takeout",ZERO_APP_PUBLICATIONS:"zero_takeout",ZERO_CVR_MAX_CONNS:"4",ZERO_NUM_SYNC_WORKERS:"2",ZERO_UPSTREAM_MAX_CONNS:"8"}})},{name:"expensify",label:"Expensify",dir:c(_,"github/expensify"),preferredPort:8087,framework:"rock",runtimeConfig:{env:B},sidecars:[{name:"web-proxy",port:9e3,readyPath:"/api/Ping",command:()=>({cmd:`bun ${JSON.stringify(pe())}`,env:B})}],command:e=>({cmd:`fnm exec --using=20.20.0 npx rock start --port ${e} --no-interactive`,env:B})},{name:"artsy",label:"Artsy",dir:p,preferredPort:8088,framework:"expo",runtimeConfig:Ge(),prepare:()=>{$e()},command:e=>({cmd:`npx react-native start --port ${e}`}),credentials:{envVars:["SOOTSIM_ARTSY_EMAIL","SOOTSIM_ARTSY_PASSWORD"],note:"auto-login reuses Artsy\u2019s built-in Maestro launch-arguments hook"}},{name:"rainbow",label:"Rainbow",dir:P,preferredPort:8089,framework:"rock",sidecars:[{name:"metadata-proxy",port:F,readyPath:"/health",command:()=>({cmd:`bun ${JSON.stringify(_e())}`,env:{PORT:String(F),RAINBOW_PUBLIC_RPC_URLS:JSON.stringify(ie),RAINBOW_UPSTREAM_METADATA_BASE_URL:I}})}],prepare:()=>{Ye()},command:e=>({cmd:`fnm exec --using=22 yarn start --port ${e} --reset-cache`,env:We()}),credentials:{envVars:["RAINBOW_TEST_WALLET"],optionalEnvVars:["RAINBOW_WALLETCONNECT_PROJECT_ID","WC_PROJECT_ID","IMGIX_DOMAIN","IMGIX_TOKEN"],note:"launcher supplies demo encryption, public mainnet RPC, and a placeholder WalletConnect project id; use only a public throwaway mnemonic for RAINBOW_TEST_WALLET"}},{name:"rocket-chat",label:"Rocket.Chat",dir:c(_,"github/Rocket.Chat.ReactNative"),preferredPort:8093,framework:"expo",command:e=>({cmd:`npx react-native start --port ${e}`,env:{RUNNING_E2E_TESTS:"true"}}),credentials:{envVars:["ROCKET_CHAT_DEMO_SERVER","ROCKET_CHAT_DEMO_USERNAME","ROCKET_CHAT_DEMO_PASSWORD"],known:{SERVER:"https://mobile.qa.rocket.chat"},note:"use packages/sootsim-engine/scripts/rocket-chat-demo-auth.ts to create/login a disposable QA user and print the rocketchat://auth deep link"}},{name:"mattermost",label:"Mattermost",dir:Se,preferredPort:8090,framework:"expo",sidecars:[{name:"preview-server",port:8065,readyPath:"/api/v4/system/ping",command:()=>({cmd:`bun ${JSON.stringify(Ee())}`})}],runtimeConfig:{modules:{"react-native-keychain":!1,"dist/assets/config.json":{inline:{AuthUrlScheme:"mmauth://",AuthUrlSchemeDev:"mmauthbeta://",DefaultServerUrl:"http://localhost:8065",DefaultServerName:"Mattermost Demo",TestServerUrl:"http://localhost:8065",AutoSelectServerUrl:!0,WebsiteURL:"https://mattermost.com",ServerNoticeURL:"https://github.com/mattermost/mattermost-server/blob/master/NOTICE.txt",MobileNoticeURL:"https://github.com/mattermost/mattermost-mobile/blob/master/NOTICE.txt",RudderApiKey:"",SentryEnabled:!1,SentryDsnIos:"",SentryDsnAndroid:"",SentryOptions:{deactivateStacktraceMerging:!0,autoBreadcrumbs:{xhr:!1,console:!0},severityLevelFilter:["fatal"]},ShowReview:!1,ShowOnboarding:!1,ExperimentalNormalizeMarkdownLinks:!1,CustomRequestHeaders:{},CollectNetworkMetrics:!1}}},nativeModules:{RNKeychainManager:{file:Re()},RNUtils:{file:ge()},GenericClient:{file:W()},ApiClient:{file:W()},WebSocketClient:{file:W()}}},command:e=>({cmd:`npx react-native start --host 127.0.0.1 --port ${e}`}),credentials:{known:{SERVER:"http://localhost:8065",USERNAME:"demo",PASSWORD:"DemoPassword1!"},note:"local mattermost-preview seeded through the real REST API; no signup or OTP needed"}},{name:"joplin",label:"Joplin",dir:Ie,preferredPort:8084,framework:"expo",prepare:()=>{be(),we()},command:e=>({cmd:`npx expo start --port ${e}`,env:{BROWSERSLIST_IGNORE_OLD_DATA:"true"}}),credentials:{note:"no login required \u2014 sync.target=0 (None), seed via WelcomeUtils"}}];import{exec as Je}from"child_process";import Ve from"http";import qe from"net";import{promisify as Qe}from"util";var St="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function Fe(e){return/^https?:\/\//i.test(e)}function He(e){return e.endsWith(".bundle")}function je(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function ce(e){try{let t=Fe(e),n=new URL(e,"http://soot.local");return n.pathname=n.pathname.replace(/\.\.bundle$/,".bundle"),He(n.pathname)?(n.searchParams.delete("transform.bytecode"),je(n),t?n.toString():`${n.pathname}${n.search}${n.hash}`):e}catch{return e}}var j=Qe(Je),Xe=250,ze=1500,Ze=120;function et(e,t=Ze){return new Promise(n=>{let r=new qe.Socket,o=!1,a=i=>{o||(o=!0,r.destroy(),n(i))};r.setTimeout(t),r.once("connect",()=>a(!0)),r.once("timeout",()=>a(!1)),r.once("error",()=>a(!1)),r.connect(e,"localhost")})}function b(e,t,n="GET",r=Xe,o={}){return new Promise(a=>{let i=Ve.request({hostname:"localhost",port:e,path:t,method:n,timeout:r,headers:o},s=>{let u="";s.on("data",f=>u+=f.toString());let l=(()=>{let f=s.headers["content-type"];if(typeof f=="string")return f;if(Array.isArray(f))return f[0]})();s.on("end",()=>a({statusCode:s.statusCode||0,body:u,contentType:l}))});i.on("error",()=>a(null)),i.setTimeout(r,()=>{i.destroy(),a(null)}),i.end()})}var tt=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function H(e,t){return!(e<=0||e>=2e4||t.has(e)||e>=5170&&e<=5200)}async function nt(e=[]){let t=new Set(e);try{let{stdout:n}=await j("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(n.trim()){let r=new Map;for(let o of n.trim().split(`
|
|
65
|
+
`)){let a=o.trim().split(/\s+/);if(a.length<9)continue;let i=Number(a[1]),u=a[8].match(/:(\d+)$/);if(!u)continue;let l=Number(u[1]);H(l,t)&&(r.has(l)||r.set(l,i))}if(r.size>0)return[...r.entries()].map(([o,a])=>({port:o,pid:a}))}}catch{}try{let{stdout:n}=await j(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(n.trim()){let r=new Map;for(let o of n.trim().split(`
|
|
66
|
+
`)){let a=o.match(/:(\d+)\s/),i=o.match(/pid=(\d+)/);if(!a)continue;let s=Number(a[1]),u=i?Number(i[1]):0;H(s,t)&&(r.has(s)||r.set(s,u))}if(r.size>0)return[...r.entries()].map(([o,a])=>({port:o,pid:a}))}}catch{}return tt.filter(n=>H(n.port,t))}var M=new Map;async function rt(e){if(e<=0)return null;let t=M.get(e);if(t)return t;try{let{stdout:n}=await j(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let r of n.split(`
|
|
67
|
+
`))if(r.startsWith("n")&&r.length>1){let o=r.slice(1).trim();if(o)return M.set(e,o),o}}catch{}return null}function ot(e,t){return{port:e,framework:t,bundleUrl:T(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function T(e,t){let n=ae.find(o=>o.preferredPort===e),r=n?.runtimeConfig?V(t,n.runtimeConfig):t;return ce(r)}function st(e){return e.includes("/node_modules/one/metro-entry.bundle")}function it(e){try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function k(e,t,n){if(!t)return e;try{let r=JSON.parse(t.body),o=r?.extra?.expoClient||r?.extra||{};o.name&&(e.projectName=o.name),o.ios?.bundleIdentifier&&(e.bundleId=o.ios.bundleIdentifier),e.framework==="metro"&&o.sdkVersion&&(e.framework="expo");let a=r?.launchAsset?.url;a&&!e.patched&&!st(e.bundleUrl)&&(e.bundleUrl=T(e.port,a));let i=o.iconUrl||o.ios?.iconUrl||o.icon||o.ios?.icon;if(i)if(e.iconPath=i,n)if(i.startsWith("http"))e.iconUrl=n(i);else{let s=i.replace(/^\.\//,"");e.iconUrl=n(`http://localhost:${e.port}/assets/${s}`)}else e.iconUrl=i.startsWith("http")?i:`http://localhost:${e.port}/assets/${i.replace(/^\.\//,"")}`}catch{}return e}var E=new Set,A=new Set,w=new Set;async function at(e,t){if(!await et(e))return null;let n="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[r,o,a,i]=await Promise.all([E.has(e)?Promise.resolve(null):b(e,"/__soot/"),b(e,"/status"),w.has(e)?Promise.resolve(null):b(e,"/","GET",ze,{"expo-platform":"ios"}),A.has(e)?Promise.resolve(null):b(e,"/_expo/status")]);i&&i.statusCode===200?A.delete(e):A.has(e)||A.add(e);let s=a?it(a.body):null,u=typeof s?.launchAsset?.url=="string"?s.launchAsset.url:null,l=s?.extra?.expoClient||s?.extra||{};if(s&&(u||typeof l.name=="string")){E.add(e);let m=u||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,ue=m.includes("/one/metro-entry.bundle")?"one":"expo";return k({port:e,framework:ue,bundleUrl:T(e,m),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,t)}if(o&&o.body.includes("packager-status:running"))return E.add(e),k(ot(e,i&&i.statusCode===200?"expo":"metro"),a,t);if(r&&r.statusCode===200&&r.body.includes("sootsim-patched"))return E.delete(e),k({port:e,framework:"one",bundleUrl:T(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},a,t);let f=await b(e,n,"HEAD");return f&&f.statusCode>0&&f.statusCode<400&&/application\/javascript/i.test(f.contentType||"")?(E.add(e),w.add(e),k({port:e,framework:"one",bundleUrl:T(e,`http://localhost:${e}${n}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,t)):(E.add(e),null)}function ct(e){let t=e.projectName?.trim().toLowerCase();return!!(t==="soot"||t==="sootsim"||e.bundleId?.trim().toLowerCase()?.startsWith("dev.soot"))}var U=new Map,ut=3e4,dt=1500;function lt(e){return!e||e.framework==="metro"||e.framework==="unknown"}function ft(e){return e?T(e.port,e.bundleUrl)===e.bundleUrl:!0}function mt(e,t,n=Date.now()){if(t===0||e.pid!==t||!ft(e.result))return!1;let r=n-e.cachedAt;return!(e.result===null&&r>=ut||lt(e.result)&&r>=dt)}async function bt(e={}){let t=await nt(e.excludePorts),n=new Set(t.map(s=>s.port));for(let s of[...U.keys()])n.has(s)||U.delete(s);for(let s of[...E])n.has(s)||E.delete(s);for(let s of[...A])n.has(s)||A.delete(s);for(let s of[...w])n.has(s)||w.delete(s);let r=[],o=[];for(let{port:s,pid:u}of t){let l=U.get(s);if(l&&mt(l,u)){l.result&&r.push(l.result);continue}l&&l.pid!==u&&(E.delete(s),A.delete(s),w.delete(s)),o.push({port:s,pid:u})}o.length>0&&(await Promise.all(o.map(u=>at(u.port,e.buildIconProxyUrl)))).forEach((u,l)=>{let{port:f,pid:m}=o[l];m!==0&&U.set(f,{pid:m,result:u,cachedAt:Date.now()}),u&&r.push(u)});let a=new Map;for(let{port:s,pid:u}of t)u>0&&a.set(s,u);await Promise.all(r.map(async s=>{let u=a.get(s.port);if(!u)return;s.pid=u;let l=await rt(u);l&&(s.cwd=l)}));let i=new Set(a.values());for(let s of[...M.keys()])i.has(s)||M.delete(s);return r.filter(s=>!ct(s))}export{V as a,St as b,ce as c,ae as d,at as e,bt as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-5BE3UOTI.js";import{l as o}from"./chunk-UFLVNYH3.js";import{chmodSync as p,existsSync as d,mkdirSync as g,readFileSync as I,rmSync as f,writeFileSync as _}from"node:fs";import{dirname as h,join as y,resolve as k}from"node:path";function i(){return y(o(),"credentials.json")}function S(){let n=i();if(!d(n))return null;try{let t=JSON.parse(I(n,"utf8"));return t.version!==1||typeof t.apiKey!="string"||!t.apiKey.startsWith("sk_sootsim_")?null:t.apiKey}catch{return null}}function w(n){if(!n.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let t=i();g(h(k(t)),{recursive:!0}),_(t,JSON.stringify({version:1,apiKey:n,savedAt:new Date().toISOString()},null,2)+`
|
|
3
3
|
`);try{p(t,384)}catch{}}function E(){f(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function O(n){return!!(n&&n.length>=20&&n.length<=256&&m.some(t=>n.startsWith(t)))}function A(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),r=n||t;if(!O(r))return null;let e=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!e)return null;let[l,u]=e.includes("/")?e.split("/",2):[null,null],c=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),a=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:e,repositoryId:c||null,owner:l||null,repo:u||null,installationId:a||null,source:n?"soot-runner":"github-actions"}}function x(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=A();if(t)return t;let r=S();if(r)return{kind:"api-key",secret:r,source:"file"};let e=s();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function H(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function N(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{S as a,w as b,E as c,x as d,H as e,N as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import r from"node:fs";import{homedir as O}from"node:os";import n from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",j="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?n.resolve(e):n.join(O(),".sootsim")}function K(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${n.sep}packages${n.sep}sootsim${n.sep}`)}catch{return!1}}function f(){return n.join(c(),"runtimes")}function _(e){return n.join(f(),e)}function D(){return n.join(f(),E)}function S(){return n.join(c(),"electron")}function U(){return n.join(S(),"userData")}function Y(e){return n.join(S(),e)}function N(){return n.join(c(),"profiles")}function F(){return n.join(c(),"daemon-app")}function T(){return n.join(F(),"SootSim Daemon.app")}function G(){return n.join(T(),"Contents","MacOS","sootsim-daemon")}function C(){return n.join(c(),"cache")}function p(){return n.join(c(),A)}function d(){return n.join(c(),j)}function v(){try{let e=r.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function M(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return r.writeFileSync(u,`${JSON.stringify(s,null,2)}
|
|
3
3
|
`,"utf8"),r.renameSync(u,d()),s}function X(){return v().telemetry!==!1}function q(e){M({telemetry:e})}function y(){r.mkdirSync(c(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(S(),{recursive:!0}),r.mkdirSync(N(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0})}function w(){try{let e=r.readFileSync(D(),"utf8").trim();return e.length>0?e:null}catch{return null}}function z(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(D(),`${e}
|
|
4
4
|
`,"utf8")}function Q(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(P)}catch{return[]}}function P(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,k=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,k]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function W(){let e=w();if(!e)return null;let t=_(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var h=16*1024;function R(){try{let e=r.openSync(p(),"r");try{let t=Buffer.alloc(h),s=r.readSync(e,t,0,h,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{r.closeSync(e)}}catch{return null}}function $(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function H(e){y();let t=`${p()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},c={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},r=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:c},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function S(e){return h[e]}function g(){return Object.keys(h)}var i={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},v="iphone-17-pro";var f=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],x=Object.fromEntries(f.map(e=>[e.name,e.value]));function B(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:null}function b(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function I(e){return Object.prototype.hasOwnProperty.call(s,e)?b(s[e]):null}var d={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(i),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),a=n.get("device");a&&d.deviceModel.options?.includes(a)&&(e.deviceModel=a);let l=n.get("colorScheme")??n.get("theme");l&&d.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function R(){let e={};for(let[n,a]of Object.entries(d))e[n]=a.default;return Object.assign(e,y()),e}export{P as a,v as b,B as c,b as d,I as e,h as f,S as g,g as h,d as i,y as j,R as k};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as w,i as u,j as m,k as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as w,i as u,j as m,k as l}from"./chunk-UL6LFMI4.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.94 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|