sootsim 0.1.36 → 0.1.38
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/README.md +20 -5
- package/dist-cli/bin.js +15 -20
- package/dist-cli/chunks/{agent-YZB6D3DR.js → agent-CGQWOOOL.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-VHCVS22I.js → agent-wrapper-M6P53GJ2.js} +10 -10
- package/dist-cli/chunks/{assert-AIVCKKLG.js → assert-O7N2SYJZ.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-DF4KYGPS.js +2 -0
- package/dist-cli/chunks/beta-AK25X3AU.js +2 -0
- package/dist-cli/chunks/chunk-23YMXBQ2.js +1 -0
- package/dist-cli/chunks/chunk-2ABGQIW7.js +4 -0
- package/dist-cli/chunks/chunk-5HNZO5AI.js +7 -0
- package/dist-cli/chunks/chunk-5XI3AB4I.js +3 -0
- package/dist-cli/chunks/{chunk-IJMYFYDZ.js → chunk-67K3WAEZ.js} +2 -2
- package/dist-cli/chunks/chunk-6UJXRT7F.js +5 -0
- package/dist-cli/chunks/chunk-ARH3T5NK.js +66 -0
- package/dist-cli/chunks/{chunk-VFDRZNPN.js → chunk-B4VH67D3.js} +1 -1
- package/dist-cli/chunks/chunk-BEY2QVU5.js +3 -0
- package/dist-cli/chunks/chunk-CB4PUMI2.js +1 -0
- package/dist-cli/chunks/chunk-CHMHTTI7.js +11 -0
- package/dist-cli/chunks/chunk-E473YTRQ.js +2 -0
- package/dist-cli/chunks/chunk-FCOCFEBU.js +27 -0
- package/dist-cli/chunks/chunk-FRE5TY3C.js +1 -0
- package/dist-cli/chunks/chunk-FX3PPKSJ.js +2 -0
- package/dist-cli/chunks/{chunk-27P763IZ.js → chunk-FXY5FWVY.js} +2 -2
- package/dist-cli/chunks/{chunk-A5BRCXYE.js → chunk-G23GIRBM.js} +1 -1
- package/dist-cli/chunks/chunk-G62Q2MQI.js +1 -0
- package/dist-cli/chunks/chunk-GWQUPWVO.js +2 -0
- package/dist-cli/chunks/{chunk-EWSQSALM.js → chunk-H6CG42HE.js} +4 -4
- package/dist-cli/chunks/chunk-HNAGYNWN.js +16 -0
- package/dist-cli/chunks/{chunk-KAXZHEKM.js → chunk-IE2WYVJF.js} +1 -1
- package/dist-cli/chunks/chunk-IKVIHHWE.js +2 -0
- package/dist-cli/chunks/chunk-JJVZMGRM.js +2 -0
- package/dist-cli/chunks/{chunk-HWCKZXNJ.js → chunk-LNRBXCUI.js} +2 -2
- package/dist-cli/chunks/{chunk-CYCXOAVZ.js → chunk-MTPWS4JK.js} +4 -4
- package/dist-cli/chunks/{chunk-G7XQD4KC.js → chunk-NKYTISAN.js} +2 -2
- package/dist-cli/chunks/chunk-NSZBULGG.js +348 -0
- package/dist-cli/chunks/chunk-P32FCOS3.js +4 -0
- package/dist-cli/chunks/chunk-P722XCFT.js +3 -0
- package/dist-cli/chunks/chunk-PFRPXFSL.js +117 -0
- package/dist-cli/chunks/chunk-QD22CQLH.js +5 -0
- package/dist-cli/chunks/chunk-QI4VLQ3A.js +5 -0
- package/dist-cli/chunks/{chunk-OXN2PEB7.js → chunk-SKNHJDYO.js} +3 -3
- package/dist-cli/chunks/{chunk-YIO6S3R5.js → chunk-T442FYM5.js} +1 -1
- package/dist-cli/chunks/chunk-TR554AIH.js +17 -0
- package/dist-cli/chunks/chunk-UD5ILFN5.js +3 -0
- package/dist-cli/chunks/{chunk-LHDWH7VS.js → chunk-VIEK76DX.js} +1 -1
- package/dist-cli/chunks/chunk-VVUEWU2P.js +64 -0
- package/dist-cli/chunks/{chunk-RMW5BO3S.js → chunk-Z2PBRNJP.js} +2 -2
- package/dist-cli/chunks/chunk-ZEVZN3S4.js +2 -0
- package/dist-cli/chunks/{compat-Y2O2U7FL.js → compat-DNQWSPFQ.js} +2 -2
- package/dist-cli/chunks/{config-SRBOFUCI.js → config-ABR5BGUO.js} +2 -2
- package/dist-cli/chunks/control-DEHRU4XZ.js +2 -0
- package/dist-cli/chunks/cpu-profile-Y5YDH6X2.js +22 -0
- package/dist-cli/chunks/daemon-2Z4DAJT6.js +83 -0
- package/dist-cli/chunks/{debug-BIDMW2PE.js → debug-R36UPOJP.js} +4 -4
- package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +2 -0
- package/dist-cli/chunks/detox-FQJWEWLT.js +49 -0
- package/dist-cli/chunks/device-SXKLDZEC.js +16 -0
- package/dist-cli/chunks/diagnose-M7RKNI2H.js +41 -0
- package/dist-cli/chunks/drivers-NSCX5CRA.js +2 -0
- package/dist-cli/chunks/electron-YUAKGT4H.js +18 -0
- package/dist-cli/chunks/flow-UQSRNEZD.js +2 -0
- package/dist-cli/chunks/hints-SDD7L3VS.js +2 -0
- package/dist-cli/chunks/home-paths-QMCX2227.js +2 -0
- package/dist-cli/chunks/inspect-6FPPW7GS.js +1101 -0
- package/dist-cli/chunks/install-TTH3PM3B.js +2 -0
- package/dist-cli/chunks/{install-desktop-2MYEI4FM.js → install-desktop-EKMYRDQH.js} +3 -3
- package/dist-cli/chunks/{keys-7PNASIQR.js → keys-ODG3TDUP.js} +2 -2
- package/dist-cli/chunks/{launch-JNS47LAQ.js → launch-7HUL745I.js} +3 -3
- package/dist-cli/chunks/{login-YWZWUHBS.js → login-BJKQMJYT.js} +4 -4
- package/dist-cli/chunks/{logout-O6SXMSBP.js → logout-7NG3KGJD.js} +2 -2
- package/dist-cli/chunks/maestro-VFEUWV3Q.js +80 -0
- package/dist-cli/chunks/{preview-WGKJO5FS.js → preview-WZ6XNOBC.js} +2 -2
- package/dist-cli/chunks/profile-DXFEZOHB.js +22 -0
- package/dist-cli/chunks/react-QP7PL5CZ.js +30 -0
- package/dist-cli/chunks/{record-QPWLYH5R.js → record-AFE25EMH.js} +5 -5
- package/dist-cli/chunks/{runtime-KEMO2MSB.js → runtime-GFWS3QLZ.js} +3 -3
- package/dist-cli/chunks/screenshot-U6VFOVFW.js +28 -0
- package/dist-cli/chunks/screenshot-mode-HNGV3AFC.js +17 -0
- package/dist-cli/chunks/screenshots-GYMRDUJR.js +70 -0
- package/dist-cli/chunks/server-3Q22YYM6.js +35 -0
- package/dist-cli/chunks/setup-repo-NNDWIGZR.js +2 -0
- package/dist-cli/chunks/{skills-MO7BFNVM.js → skills-FT76ZVAV.js} +2 -2
- package/dist-cli/chunks/start-N573LFCF.js +23 -0
- package/dist-cli/chunks/store-6NTDGLPH.js +2 -0
- package/dist-cli/chunks/telemetry-SNZBIRGL.js +2 -0
- package/dist-cli/chunks/{test-XUI3KNNQ.js → test-AJPY2Q6W.js} +3 -3
- package/dist-cli/chunks/three-mode-JZZVOMTG.js +39 -0
- package/dist-cli/chunks/timeline-GTSCF5P6.js +22 -0
- package/dist-cli/chunks/upload-UHTVCGGR.js +2 -0
- package/dist-cli/chunks/what-happened-N3AQ6I7O.js +15 -0
- package/dist-cli/chunks/whoami-FOIMN6UC.js +2 -0
- package/dist-lib/agent-daemon-client.cjs +4 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +41 -39
- package/dist-lib/attached-projects.cjs +30 -28
- package/dist-lib/auth/shared-session.cjs +35 -27
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +6 -2
- package/dist-lib/dev-bundle-resolution.cjs +5 -50
- package/dist-lib/home-paths.cjs +94 -38
- package/dist-lib/host/bridge-host.cjs +2144 -1330
- package/dist-lib/host/fetch-proxy-handler.cjs +248 -0
- package/dist-lib/index.cjs +21 -21
- package/dist-lib/metro.cjs +21 -21
- package/dist-lib/profiles.cjs +246 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +3410 -1632
- package/dist-lib/vite.cjs +1 -1
- package/package.json +7 -1
- package/dist-cli/chunks/auto-bootstrap-MLNTX23H.js +0 -2
- package/dist-cli/chunks/chunk-3UIWOHC2.js +0 -62
- package/dist-cli/chunks/chunk-5KGFHWVR.js +0 -1
- package/dist-cli/chunks/chunk-5QIUJNT3.js +0 -5
- package/dist-cli/chunks/chunk-6GGMKFWJ.js +0 -4
- package/dist-cli/chunks/chunk-6Z275LCY.js +0 -2
- package/dist-cli/chunks/chunk-75LBYBKW.js +0 -11
- package/dist-cli/chunks/chunk-DFN3GGH7.js +0 -5
- package/dist-cli/chunks/chunk-EBEHZJRG.js +0 -117
- package/dist-cli/chunks/chunk-EJLNUMMP.js +0 -3
- package/dist-cli/chunks/chunk-FE7UI3MT.js +0 -4
- package/dist-cli/chunks/chunk-G663654J.js +0 -1
- package/dist-cli/chunks/chunk-GW7XY5KC.js +0 -2
- package/dist-cli/chunks/chunk-H2QO4TDV.js +0 -22
- package/dist-cli/chunks/chunk-HWFHBMAQ.js +0 -27
- package/dist-cli/chunks/chunk-J7CTD37P.js +0 -1
- package/dist-cli/chunks/chunk-N32NCVL2.js +0 -3
- package/dist-cli/chunks/chunk-NIZBR7EK.js +0 -2
- package/dist-cli/chunks/chunk-NYY36OKU.js +0 -308
- package/dist-cli/chunks/chunk-PJL25JQV.js +0 -5
- package/dist-cli/chunks/chunk-SHO54NET.js +0 -2
- package/dist-cli/chunks/chunk-SMVJOWSV.js +0 -16
- package/dist-cli/chunks/chunk-TC6V7YFC.js +0 -3
- package/dist-cli/chunks/chunk-YLIIVTTQ.js +0 -3
- package/dist-cli/chunks/chunk-YR7BGGYE.js +0 -2
- package/dist-cli/chunks/chunk-ZEW3RF5Q.js +0 -1
- package/dist-cli/chunks/control-PL2V2O6S.js +0 -2
- package/dist-cli/chunks/daemon-IZC32PZW.js +0 -50
- package/dist-cli/chunks/demo-app-registry-5JFOUU3D.js +0 -2
- package/dist-cli/chunks/detox-B3FDOIS3.js +0 -49
- package/dist-cli/chunks/device-ZZSI363W.js +0 -16
- package/dist-cli/chunks/drivers-S4NGK4DB.js +0 -2
- package/dist-cli/chunks/electron-5YFHXEOI.js +0 -15
- package/dist-cli/chunks/flow-JJBO6TFY.js +0 -2
- package/dist-cli/chunks/hints-G5HBBV2O.js +0 -2
- package/dist-cli/chunks/home-paths-VWC3FWA3.js +0 -2
- package/dist-cli/chunks/inspect-POOPWUQI.js +0 -1034
- package/dist-cli/chunks/install-MP6FHXNZ.js +0 -2
- package/dist-cli/chunks/install-dev-desktop-SKH3KEHY.js +0 -100
- package/dist-cli/chunks/maestro-CW6XVUKV.js +0 -75
- package/dist-cli/chunks/profile-SUOBRPIC.js +0 -22
- package/dist-cli/chunks/screenshot-JTY46V7G.js +0 -26
- package/dist-cli/chunks/screenshot-mode-7OYBBX6D.js +0 -17
- package/dist-cli/chunks/screenshots-QISKC4GD.js +0 -70
- package/dist-cli/chunks/server-YSFJAKAV.js +0 -34
- package/dist-cli/chunks/setup-repo-LFB3HBEO.js +0 -2
- package/dist-cli/chunks/store-6MFL53I4.js +0 -2
- package/dist-cli/chunks/telemetry-CN42GMVC.js +0 -2
- package/dist-cli/chunks/upload-6FUT7AX5.js +0 -2
- package/dist-cli/chunks/whoami-TQFHY42N.js +0 -2
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as S,b as E}from"./chunk-IJMYFYDZ.js";import"./chunk-EJLNUMMP.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import{a as O}from"./chunk-LHDWH7VS.js";import{execFileSync as N,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as $,readFileSync as R,rmSync as A,writeFileSync as I}from"fs";import{homedir as w}from"os";import{dirname as P,resolve as d}from"path";var T=60,p="dev.sootsim.server",l="sootsim-server",y=d(w(),"Library/Logs/sootsim"),C=d(w(),".local/state/sootsim");async function rt(t,e={}){let[r,...o]=t,n=e.port??7668;if(!r||r==="--help"||r==="-h"){D();return}new Set(["install","uninstall","restart","start","stop"]).has(r)&&S({event:`daemon_${r}`,properties:{platform:process.platform,subsource:"daemon"}});try{switch(r){case"install":return await W({port:n,force:o.includes("--force")});case"uninstall":return await G();case"status":return await K();case"restart":return await X();case"start":return await H();case"stop":return await V();default:console.error(` unknown daemon subcommand: ${r}`),D(),process.exit(1)}}finally{await E()}}function D(){console.log(`
|
|
3
|
-
sootsim daemon \u2014 manage the sootsim bridge daemon
|
|
4
|
-
|
|
5
|
-
the daemon is registered automatically on first CLI use, so you usually
|
|
6
|
-
don't need to run any of these subcommands. use them to inspect or remove
|
|
7
|
-
the launchd/systemd agent.
|
|
8
|
-
|
|
9
|
-
usage:
|
|
10
|
-
sootsim daemon uninstall stop and remove the login agent
|
|
11
|
-
sootsim daemon status show whether the agent is installed + running
|
|
12
|
-
sootsim daemon restart restart the agent (use after 'npm update -g sootsim')
|
|
13
|
-
sootsim daemon start start the installed agent
|
|
14
|
-
sootsim daemon stop stop the running agent
|
|
15
|
-
|
|
16
|
-
examples:
|
|
17
|
-
sootsim daemon status
|
|
18
|
-
sootsim daemon restart
|
|
19
|
-
sootsim daemon uninstall
|
|
20
|
-
`)}function U(){let t=B();return{executable:process.execPath,prefixArgs:[t]}}function B(){try{let e=N("which",["sootsim"],{encoding:"utf8"}).trim();if(e&&c(e))return L(e)}catch{}let t=process.argv[1];if(t&&c(t))return L(t);throw new Error("could not locate the sootsim binary")}function L(t){try{return O("fs").realpathSync(t)}catch{return t}}function M(t,e){$(y,{recursive:!0});let r=d(y,"server.out.log"),o=d(y,"server.err.log"),n=[t.executable,...t.prefixArgs,"server","--quiet","--port",String(e)].map(a=>` <string>${j(a)}</string>`).join(`
|
|
21
|
-
`);return`<?xml version="1.0" encoding="UTF-8"?>
|
|
22
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
23
|
-
<plist version="1.0">
|
|
24
|
-
<dict>
|
|
25
|
-
<key>Label</key><string>${p}</string>
|
|
26
|
-
<key>ProgramArguments</key>
|
|
27
|
-
<array>
|
|
28
|
-
${n}
|
|
29
|
-
</array>
|
|
30
|
-
<key>RunAtLoad</key><true/>
|
|
31
|
-
<key>KeepAlive</key><true/>
|
|
32
|
-
<key>ThrottleInterval</key><integer>${T}</integer>
|
|
33
|
-
<key>ProcessType</key><string>Background</string>
|
|
34
|
-
<key>StandardOutPath</key><string>${r}</string>
|
|
35
|
-
<key>StandardErrorPath</key><string>${o}</string>
|
|
36
|
-
</dict>
|
|
37
|
-
</plist>
|
|
38
|
-
`}function F(t,e){return $(C,{recursive:!0}),`[Unit]
|
|
39
|
-
Description=sootsim bridge daemon
|
|
40
|
-
After=default.target
|
|
41
|
-
|
|
42
|
-
[Service]
|
|
43
|
-
Type=simple
|
|
44
|
-
ExecStart=${[t.executable,...t.prefixArgs].map(q).join(" ")} server --quiet --port ${e}
|
|
45
|
-
Restart=always
|
|
46
|
-
RestartSec=${T}
|
|
47
|
-
|
|
48
|
-
[Install]
|
|
49
|
-
WantedBy=default.target
|
|
50
|
-
`}function j(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function q(t){return/[^\w@%+=:,./-]/.test(t)?`'${t.replace(/'/g,"'\\''")}'`:t}function b(){return d(w(),"Library/LaunchAgents",`${p}.plist`)}function k(){return d(w(),".config/systemd/user",`${l}.service`)}async function W({port:t,force:e}){let r=U();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){let o=b();if(c(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}$(P(o),{recursive:!0}),I(o,M(r,t)),console.log(` wrote ${o}`);let n=`gui/${process.getuid()}`,a=`${n}/${p}`,v=()=>{let i=s("launchctl",["bootstrap",n,o],{stdio:"pipe",encoding:"utf8"}),h=(i.stderr||i.stdout||"").trim();if(i.status!==0)return{ok:!1,reason:`bootstrap exit ${i.status}${h?`: ${h}`:""}`};let x=s("launchctl",["print",a],{encoding:"utf8"});return x.status!==0?{ok:!1,reason:`bootstrap returned 0 but service not registered (print exit ${x.status})`}:{ok:!0}},u=v();if(!u.ok){let i=u.reason;if(s("launchctl",["bootout",a],{stdio:"ignore"}),u=v(),!u.ok)throw new Error(`launchctl bootstrap failed: ${u.reason}`+(i!==u.reason?` (initial: ${i})`:"")+" \u2014 try `sootsim daemon uninstall` then retry, or reboot if launchd state is stuck.")}let m=Date.now()+4e3,g,f;for(;Date.now()<m;){let i=s("launchctl",["print",a],{encoding:"utf8"});if(i.status===0&&(g=i.stdout?.match(/state\s*=\s*(\w+)/)?.[1],f=i.stdout?.match(/pid\s*=\s*(\d+)/)?.[1],g==="running"||f))break;await new Promise(h=>setTimeout(h,150))}if(g!=="running"&&!f)throw new Error(`daemon registered but did not reach running state within 4s (last state: ${g||"unknown"}). check ${d(y,"server.err.log")} \u2014 typically a stale runtime or a port already bound by another process.`);console.log(` registered (state: ${g||"unknown"}${f?`, pid ${f}`:""}, log: ${d(y,"server.err.log")})`);return}if(process.platform==="linux"){let o=k();if(c(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}$(P(o),{recursive:!0}),I(o,F(r,t)),console.log(` wrote ${o}`);let n=s("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(n.status!==0){let m=(n.stderr||n.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${m?`: ${m}`:""}`)}let a=s("systemctl",["--user","enable","--now",l],{stdio:"pipe",encoding:"utf8"});if(a.status!==0){let m=(a.stderr||a.stdout||"").trim();throw new Error(`systemctl enable --now failed${m?`: ${m}`:""} \u2014 try \`sootsim daemon uninstall\` then retry.`)}let u=(s("systemctl",["--user","is-active",l],{encoding:"utf8"}).stdout||"").trim()||"unknown";console.log(` registered (state: ${u}, journalctl --user -u ${l} to tail logs)`);return}console.error(` sootsim daemon install is not supported on ${process.platform}`),console.error(" run 'sootsim server' in a persistent shell instead"),process.exit(1)}async function G(){if(process.platform==="darwin"){let t=b();if(!c(t)){console.log(" not installed");return}s("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"ignore"}),A(t,{force:!0}),console.log(` removed ${t}`);return}if(process.platform==="linux"){let t=k();if(!c(t)){console.log(" not installed");return}s("systemctl",["--user","disable","--now",l],{stdio:"ignore"}),A(t,{force:!0}),s("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),console.log(` removed ${t}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function K(){if(process.platform==="darwin"){let t=b();if(!c(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=Q(t);e&&console.log(` binary: ${e}`);let r=s("launchctl",["print",`gui/${process.getuid()}/${p}`],{encoding:"utf8"});if(r.status===0){let o=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],n=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${o||"unknown"}${n?` (pid ${n})`:""}`)}else console.log(" state: not running");return}if(process.platform==="linux"){let t=k();if(!c(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=s("systemctl",["--user","is-active",l],{encoding:"utf8"});console.log(` state: ${e.stdout.trim()||"unknown"}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function X(){if(process.platform==="darwin"){let t=b();c(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=s("launchctl",["kickstart","-k",`gui/${process.getuid()}/${p}`],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` kickstart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}if(process.platform==="linux"){let t=k();c(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=s("systemctl",["--user","restart",l],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` restart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function H(){if(process.platform==="darwin"){s("launchctl",["kickstart",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","start",l],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function V(){if(process.platform==="darwin"){s("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","stop",l],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function Q(t){try{return R(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{W as daemonInstall,rt as runDaemon};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{b as S}from"./chunk-NYY36OKU.js";import"./chunk-DFN3GGH7.js";import"./chunk-HWFHBMAQ.js";import"./chunk-EWSQSALM.js";import"./chunk-5KGFHWVR.js";import"./chunk-HWCKZXNJ.js";import"./chunk-H2QO4TDV.js";import"./chunk-3UIWOHC2.js";import"./chunk-YLIIVTTQ.js";import"./chunk-RMW5BO3S.js";import"./chunk-NIZBR7EK.js";import"./chunk-6Z275LCY.js";import"./chunk-IJMYFYDZ.js";import"./chunk-EJLNUMMP.js";import"./chunk-75LBYBKW.js";import"./chunk-GW7XY5KC.js";import"./chunk-OXN2PEB7.js";import"./chunk-YR7BGGYE.js";import"./chunk-PJL25JQV.js";import"./chunk-G663654J.js";import"./chunk-A5BRCXYE.js";import"./chunk-SHO54NET.js";import"./chunk-SMVJOWSV.js";import"./chunk-6GGMKFWJ.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";import{spawn as b}from"child_process";import{existsSync as u,mkdirSync as D,writeFileSync as f,unlinkSync as _}from"fs";import{tmpdir as I}from"os";import{dirname as P,resolve as i,join as $}from"path";function M(){try{let e=import.meta.resolve("sootsim/detox");return P(e.startsWith("file://")?e.slice(7):e)}catch{return i(import.meta.dirname,"..","..","detox")}}var E=`
|
|
3
|
-
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
|
-
|
|
5
|
-
usage:
|
|
6
|
-
sootsim detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
|
|
7
|
-
sootsim detox --config <path> use a specific jest config
|
|
8
|
-
sootsim detox init scaffold sootsim-detox.config.cjs + sample test
|
|
9
|
-
sootsim detox --watch jest watch mode
|
|
10
|
-
sootsim detox --headed keep the sootsim shell window visible
|
|
11
|
-
sootsim detox -t <pattern> pass a jest --testNamePattern
|
|
12
|
-
sootsim detox --no-launch skip auto-launching a sootsim shell
|
|
13
|
-
|
|
14
|
-
sootsim detox auto-launches a sootsim shell if none is running on the
|
|
15
|
-
expected port. disable with --no-launch if you're managing the shell yourself.
|
|
16
|
-
`;async function C(e,s={}){if((e.includes("--help")||e.includes("-h"))&&(console.log(E),process.exit(0)),e[0]==="init")return U();let c=t=>{let o=e.indexOf(t);return o>=0?e[o+1]:void 0},n=t=>e.includes(t),w=n("--watch"),h=n("--headed"),O=n("--no-launch"),y=c("--config"),d=s.port||Number(process.env.SOOTSIM_PORT)||5173,j=e.filter((t,o)=>{if(t.startsWith("--")||t==="-t"||t==="-h")return!1;let m=e[o-1];return!(m==="--config"||m==="-t"||m==="--testNamePattern"||m==="--grep")}),x=["e2e","test/e2e","detox"],l=process.env.SOOTSIM_TEST_DIR?i(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!l)for(let t of x){let o=i(process.cwd(),t);if(u(o)){l=o;break}}l||(console.error(` error: no detox tests found. expected one of: ${x.join(", ")}
|
|
17
|
-
run 'sootsim detox init' to scaffold a starter suite.`),process.exit(1)),O||await R(d);let r=["jest"],p=y||F(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),a=null;if(p)r.push("--config",i(process.cwd(),p));else{let t=i(M(),"jest-preset.cjs");a=$(I(),`sootsim-detox-${process.pid}.config.cjs`);let o={rootDir:l,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};f(a,`module.exports = { ...require(${JSON.stringify(t)}), ...${JSON.stringify(o)} }
|
|
18
|
-
`),r.push("--config",a)}w&&r.push("--watch");let g=c("-t")||c("--testNamePattern")||c("--grep");g&&r.push("-t",g),process.env.SOOTSIM_JEST_JSON==="1"&&r.push("--json"),process.env.SOOTSIM_JEST_OUTPUT_FILE&&r.push("--outputFile",process.env.SOOTSIM_JEST_OUTPUT_FILE),r.push(...j),console.log(" sootsim detox"),console.log(` test dir: ${l}`),console.log(` port: ${d}${h?" (headed)":""}`),p&&console.log(` config: ${p}`);let T=b("npx",r,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:l,SOOTSIM_PORT:String(d),SOOTSIM_HEADED:h?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${d}`}}),v=await new Promise(t=>T.on("exit",o=>t(o||0)));if(a)try{_(a)}catch{}process.exit(v)}function F(e){for(let s of e)if(u(i(process.cwd(),s)))return s;return null}async function R(e){await S()||console.warn(` warn: no sootsim shell reachable on :${e}. start one with \`bun run dev:sootsim:shell\`
|
|
19
|
-
or pass --no-launch if you're managing the shell yourself.`)}function U(){let e=process.cwd(),s=i(e,"sootsim-detox.config.cjs");u(s)?console.log(` skip: ${s} already exists`):(f(s,`// sootsim detox jest config.
|
|
20
|
-
// extends the sootsim preset, which rewrites \`import ... from 'detox'\`
|
|
21
|
-
// to the sootsim driver and keeps your jest transforms intact.
|
|
22
|
-
|
|
23
|
-
/** @type {import('@jest/types').Config.InitialOptions} */
|
|
24
|
-
module.exports = {
|
|
25
|
-
preset: 'sootsim/detox/jest-preset',
|
|
26
|
-
rootDir: __dirname,
|
|
27
|
-
testMatch: ['<rootDir>/e2e/**/*.test.ts', '<rootDir>/e2e/**/*.test.js'],
|
|
28
|
-
}
|
|
29
|
-
`),console.log(` created ${s}`));let c=i(e,"e2e"),n=i(c,"example.test.ts");u(n)?console.log(` skip: ${n} already exists`):(D(c,{recursive:!0}),f(n,`// sample sootsim detox test. resolve \`detox\` via the jest preset in
|
|
30
|
-
// sootsim-detox.config.cjs \u2014 no extra imports required.
|
|
31
|
-
|
|
32
|
-
import { by, device, element, expect, waitFor } from 'detox'
|
|
33
|
-
|
|
34
|
-
describe('example', () => {
|
|
35
|
-
beforeAll(async () => {
|
|
36
|
-
await device.launchApp()
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
it('shows the welcome text', async () => {
|
|
40
|
-
await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(5000)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('taps a button by id', async () => {
|
|
44
|
-
await element(by.id('start-button')).tap()
|
|
45
|
-
await expect(element(by.id('home-screen'))).toBeVisible()
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
`),console.log(` created ${n}`)),console.log(`
|
|
49
|
-
next:`),console.log(" bun sootsim detox # run the sample"),console.log(" bun sootsim detox --watch"),process.exit(0)}export{C as runDetox};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import"./chunk-5KGFHWVR.js";import"./chunk-RMW5BO3S.js";import"./chunk-NIZBR7EK.js";import{f as c,g as r,h as g}from"./chunk-6Z275LCY.js";import{c as d,e as l,h as a}from"./chunk-SMVJOWSV.js";import"./chunk-6GGMKFWJ.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";function h(){console.log(`
|
|
3
|
-
sootsim device \u2014 inspect or change the live device preset for a session
|
|
4
|
-
|
|
5
|
-
usage:
|
|
6
|
-
sootsim device
|
|
7
|
-
sootsim device get
|
|
8
|
-
sootsim device set <model> [--session <id>]
|
|
9
|
-
sootsim device list
|
|
10
|
-
|
|
11
|
-
examples:
|
|
12
|
-
sootsim device
|
|
13
|
-
sootsim device set iphone-14
|
|
14
|
-
sootsim device set ipad-pro-13 --session tab-7
|
|
15
|
-
`)}function v(t){let i=r(t);console.log(` ${t.padEnd(14)} ${String(i.width).padStart(4)}x${String(i.height).padEnd(4)} pt ${String(i.width*i.scale).padStart(4)}x${String(i.height*i.scale).padEnd(4)} px ${i.name}`)}async function u(t){let i=l(t);try{let s=await a(i,"SootSim.bridges.settings.get")??{deviceModel:null},o=typeof s.deviceModel=="string"?s.deviceModel:null;if(!o||!(o in c))return null;let e=r(o);return{model:o,width:e.width,height:e.height,scale:e.scale,name:e.name}}finally{i.close()}}async function x(t,i){(t.includes("--help")||t.includes("-h"))&&(h(),process.exit(0));let s=t[0];if(!s||s==="get"){let o=d(t,{port:i.port}),e=await u(o);e||(console.error(" error: could not read current device from the target session"),process.exit(1)),console.log(` ${e.model} ${e.width}x${e.height} pt ${e.width*e.scale}x${e.height*e.scale} px ${e.name}`);return}if(s==="list"){console.log(` available devices:
|
|
16
|
-
`);for(let o of g())v(o);return}if(s==="set"){let o=t[1];o||(console.error(" error: device set expects a model"),process.exit(1)),o in c||(console.error(` error: unknown device "${o}"`),console.error(" run `sootsim device list` to see valid models"),process.exit(1));let e=d(t,{port:i.port}),p=l(e);try{let m=await a(p,"SootSim.bridges.settings.set","deviceModel",o),n=r(o);console.log(` ${m?"set":"kept"} device: ${o} (${n.width}x${n.height} pt, ${n.width*n.scale}x${n.height*n.scale} px)${m?" \u2014 reloading session":""}`)}finally{p.close()}return}h(),console.error(` unknown subcommand: ${s}`),process.exit(1)}export{x as runDeviceCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import"./chunk-J7CTD37P.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-YR7BGGYE.js";import"./chunk-PJL25JQV.js";import"./chunk-G663654J.js";import"./chunk-A5BRCXYE.js";import"./chunk-LHDWH7VS.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as m}from"./chunk-VFDRZNPN.js";import"./chunk-J7CTD37P.js";import{a as u,e as a}from"./chunk-75LBYBKW.js";import"./chunk-GW7XY5KC.js";import"./chunk-OXN2PEB7.js";import{b as d,g as p}from"./chunk-YR7BGGYE.js";import{a as l}from"./chunk-PJL25JQV.js";import"./chunk-G663654J.js";import"./chunk-A5BRCXYE.js";import"./chunk-SHO54NET.js";import"./chunk-SMVJOWSV.js";import"./chunk-6GGMKFWJ.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";function g(e){let n=e.indexOf("--port");if(n<0)return;let r=e[n+1],i=r?Number(r):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${r||"(missing)"}`),process.exit(1)),i}async function h(e,n){let r=g(e)??n.port;return r?a(String(r)):void 0}async function P(e,n){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
|
-
sootsim electron \u2014 launch the desktop companion
|
|
4
|
-
|
|
5
|
-
usage:
|
|
6
|
-
sootsim electron [options]
|
|
7
|
-
|
|
8
|
-
options:
|
|
9
|
-
--port <number> connect to running dev server on this port
|
|
10
|
-
--driver <id> override the launch driver (default: electron)
|
|
11
|
-
|
|
12
|
-
examples:
|
|
13
|
-
sootsim electron
|
|
14
|
-
sootsim electron --port 5173
|
|
15
|
-
`),process.exit(0));let r=e.indexOf("--driver"),t=(r>=0?e[r+1]:void 0)||n.driver,s=d;if(t){let o=p(t);o||(console.error(` unknown driver "${t}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),s=o}if(s.id==="electron"){let o=l();if(!o){if(u(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await m("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:v}=await import("./install-desktop-2MYEI4FM.js");await v(["--yes"]),o=l()}o||process.exit(1)}console.log(` launching ${o.path}`)}let f=await h(e,n),c=await s.launch({url:f,device:n.device});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{h as resolveElectronLaunchUrl,P as runElectron};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d}from"./chunk-NYY36OKU.js";import"./chunk-DFN3GGH7.js";import"./chunk-HWFHBMAQ.js";import"./chunk-EWSQSALM.js";import"./chunk-5KGFHWVR.js";import"./chunk-HWCKZXNJ.js";import"./chunk-H2QO4TDV.js";import"./chunk-3UIWOHC2.js";import"./chunk-YLIIVTTQ.js";import"./chunk-RMW5BO3S.js";import"./chunk-NIZBR7EK.js";import"./chunk-6Z275LCY.js";import"./chunk-IJMYFYDZ.js";import"./chunk-EJLNUMMP.js";import"./chunk-75LBYBKW.js";import"./chunk-GW7XY5KC.js";import"./chunk-OXN2PEB7.js";import"./chunk-YR7BGGYE.js";import"./chunk-PJL25JQV.js";import"./chunk-G663654J.js";import"./chunk-A5BRCXYE.js";import"./chunk-SHO54NET.js";import"./chunk-SMVJOWSV.js";import"./chunk-6GGMKFWJ.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{b as t,c as r,d as l}from"./chunk-N32NCVL2.js";import"./chunk-6GGMKFWJ.js";import"./chunk-LHDWH7VS.js";function a(n){let s=n[0]??"list";if(s==="reset"){n[1]==="global"?(r(),console.log(" cleared global hint state")):(t(),console.log(" cleared hint state for this session"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,v as activeRuntimeDir,i as activeRuntimeFile,l as cacheDir,z as claimDaemonLockfile,u as compareSemver,n as configFilePath,m as daemonLockfilePath,j as electronDir,k as electronVersionDir,q as ensureSootsimHome,x as isDaemonLockfileFresh,t as listInstalledRuntimes,r as readActiveRuntime,w as readDaemonLockfile,o as readTelemetryEnabled,A as removeDaemonLockfile,h as runtimeDir,g as runtimesDir,f as sootsimHomeDir,s as writeActiveRuntime,y as writeDaemonLockfile,p as writeTelemetryEnabled};
|