sootsim 0.1.37 → 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/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-EQRQGSBL.js → agent-CGQWOOOL.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-AWKZ67GN.js → agent-wrapper-M6P53GJ2.js} +2 -2
- package/dist-cli/chunks/{assert-ZVGELUZB.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-PERKPZ7T.js → chunk-2ABGQIW7.js} +1 -1
- package/dist-cli/chunks/{chunk-H2HSOHXN.js → chunk-5HNZO5AI.js} +3 -3
- package/dist-cli/chunks/{chunk-WLIVBPPY.js → chunk-5XI3AB4I.js} +2 -2
- package/dist-cli/chunks/{chunk-S74RCIVB.js → chunk-67K3WAEZ.js} +2 -2
- package/dist-cli/chunks/{chunk-PN6FWLD4.js → chunk-6UJXRT7F.js} +1 -1
- package/dist-cli/chunks/{chunk-5FLDI6CV.js → chunk-ARH3T5NK.js} +2 -2
- package/dist-cli/chunks/{chunk-QXMZNJV5.js → chunk-B4VH67D3.js} +1 -1
- package/dist-cli/chunks/{chunk-WFXYY3DU.js → chunk-BEY2QVU5.js} +2 -2
- 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-RLNIKWFO.js → chunk-FCOCFEBU.js} +2 -2
- package/dist-cli/chunks/chunk-FRE5TY3C.js +1 -0
- package/dist-cli/chunks/chunk-FX3PPKSJ.js +2 -0
- package/dist-cli/chunks/{chunk-BGAPLYMS.js → chunk-FXY5FWVY.js} +2 -2
- package/dist-cli/chunks/{chunk-4IO3D5XG.js → chunk-G23GIRBM.js} +1 -1
- package/dist-cli/chunks/chunk-G62Q2MQI.js +1 -0
- package/dist-cli/chunks/{chunk-RX6RHGSI.js → chunk-GWQUPWVO.js} +2 -2
- package/dist-cli/chunks/{chunk-WHLHA5R5.js → chunk-H6CG42HE.js} +2 -2
- package/dist-cli/chunks/{chunk-URSEYCC5.js → chunk-HNAGYNWN.js} +2 -2
- package/dist-cli/chunks/{chunk-UIQ3536J.js → chunk-IE2WYVJF.js} +1 -1
- package/dist-cli/chunks/{chunk-EDBFYOQB.js → chunk-IKVIHHWE.js} +1 -1
- package/dist-cli/chunks/{chunk-HYYMBXIX.js → chunk-JJVZMGRM.js} +2 -2
- package/dist-cli/chunks/{chunk-DSTV2VJT.js → chunk-LNRBXCUI.js} +2 -2
- package/dist-cli/chunks/{chunk-X6BP5JFC.js → chunk-MTPWS4JK.js} +2 -2
- package/dist-cli/chunks/{chunk-LDWXH43L.js → chunk-NKYTISAN.js} +2 -2
- package/dist-cli/chunks/{chunk-L4F4JRKJ.js → chunk-NSZBULGG.js} +3 -3
- package/dist-cli/chunks/{chunk-R77F5J3X.js → chunk-P32FCOS3.js} +2 -2
- package/dist-cli/chunks/{chunk-JMGDVXAV.js → chunk-P722XCFT.js} +2 -2
- package/dist-cli/chunks/{chunk-FCQLQ7NA.js → chunk-PFRPXFSL.js} +1 -1
- package/dist-cli/chunks/chunk-QD22CQLH.js +5 -0
- package/dist-cli/chunks/{chunk-YFXTO4QX.js → chunk-QI4VLQ3A.js} +1 -1
- package/dist-cli/chunks/{chunk-Z5X3PITK.js → chunk-SKNHJDYO.js} +1 -1
- package/dist-cli/chunks/{chunk-T5L73GJB.js → chunk-T442FYM5.js} +1 -1
- package/dist-cli/chunks/{chunk-ZERYEI3L.js → chunk-TR554AIH.js} +2 -2
- package/dist-cli/chunks/{chunk-CX3ZIPD3.js → chunk-UD5ILFN5.js} +2 -2
- package/dist-cli/chunks/{chunk-B3RAGRK6.js → chunk-VIEK76DX.js} +1 -1
- package/dist-cli/chunks/{chunk-QD7YIVPS.js → chunk-VVUEWU2P.js} +2 -2
- package/dist-cli/chunks/{chunk-Z5SVSAZO.js → chunk-Z2PBRNJP.js} +2 -2
- package/dist-cli/chunks/{chunk-56BIMCDH.js → chunk-ZEVZN3S4.js} +1 -1
- package/dist-cli/chunks/{compat-QQ3OJDBI.js → compat-DNQWSPFQ.js} +2 -2
- package/dist-cli/chunks/{config-LT27SC25.js → config-ABR5BGUO.js} +2 -2
- package/dist-cli/chunks/control-DEHRU4XZ.js +2 -0
- package/dist-cli/chunks/{cpu-profile-XEO3JCVB.js → cpu-profile-Y5YDH6X2.js} +2 -2
- package/dist-cli/chunks/{daemon-3J2SAVQZ.js → daemon-2Z4DAJT6.js} +2 -2
- package/dist-cli/chunks/{debug-OGQLIH4U.js → debug-R36UPOJP.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +2 -0
- package/dist-cli/chunks/{detox-Z2OSCIQU.js → detox-FQJWEWLT.js} +2 -2
- package/dist-cli/chunks/{device-RPTVD25S.js → device-SXKLDZEC.js} +2 -2
- package/dist-cli/chunks/{diagnose-LAEXBNOQ.js → diagnose-M7RKNI2H.js} +2 -2
- package/dist-cli/chunks/drivers-NSCX5CRA.js +2 -0
- package/dist-cli/chunks/{electron-S2463O3P.js → electron-YUAKGT4H.js} +3 -3
- package/dist-cli/chunks/flow-UQSRNEZD.js +2 -0
- package/dist-cli/chunks/{hints-E5PXPWFT.js → hints-SDD7L3VS.js} +2 -2
- package/dist-cli/chunks/{home-paths-F5SGBTRZ.js → home-paths-QMCX2227.js} +2 -2
- package/dist-cli/chunks/{inspect-EVGMEZ3G.js → inspect-6FPPW7GS.js} +3 -3
- package/dist-cli/chunks/install-TTH3PM3B.js +2 -0
- package/dist-cli/chunks/{install-desktop-ZNWYKTWQ.js → install-desktop-EKMYRDQH.js} +3 -3
- package/dist-cli/chunks/{keys-5ETF6DYO.js → keys-ODG3TDUP.js} +2 -2
- package/dist-cli/chunks/{launch-DHUCNFX6.js → launch-7HUL745I.js} +3 -3
- package/dist-cli/chunks/{login-KDR34JIP.js → login-BJKQMJYT.js} +4 -4
- package/dist-cli/chunks/{logout-R6WIJYCW.js → logout-7NG3KGJD.js} +2 -2
- package/dist-cli/chunks/{maestro-ZOOJ2YVH.js → maestro-VFEUWV3Q.js} +2 -2
- package/dist-cli/chunks/{preview-YFADHNBD.js → preview-WZ6XNOBC.js} +2 -2
- package/dist-cli/chunks/{profile-CQSC32HB.js → profile-DXFEZOHB.js} +2 -2
- package/dist-cli/chunks/{react-QSQD6CJE.js → react-QP7PL5CZ.js} +2 -2
- package/dist-cli/chunks/{record-IWLEYATN.js → record-AFE25EMH.js} +2 -2
- package/dist-cli/chunks/{runtime-WKMNKYTN.js → runtime-GFWS3QLZ.js} +3 -3
- package/dist-cli/chunks/{screenshot-VJXHV57I.js → screenshot-U6VFOVFW.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-FA4VQ76K.js → screenshot-mode-HNGV3AFC.js} +2 -2
- package/dist-cli/chunks/{screenshots-U4FQXHVK.js → screenshots-GYMRDUJR.js} +2 -2
- package/dist-cli/chunks/{server-7WZLM5NQ.js → server-3Q22YYM6.js} +2 -2
- package/dist-cli/chunks/setup-repo-NNDWIGZR.js +2 -0
- package/dist-cli/chunks/{skills-KO7RCY24.js → skills-FT76ZVAV.js} +2 -2
- package/dist-cli/chunks/{start-EBD7T2GW.js → start-N573LFCF.js} +3 -3
- package/dist-cli/chunks/store-6NTDGLPH.js +2 -0
- package/dist-cli/chunks/telemetry-SNZBIRGL.js +2 -0
- package/dist-cli/chunks/{test-OSVUG54G.js → test-AJPY2Q6W.js} +3 -3
- package/dist-cli/chunks/{three-mode-MDBXZQG4.js → three-mode-JZZVOMTG.js} +2 -2
- package/dist-cli/chunks/{timeline-UJOKZKQR.js → timeline-GTSCF5P6.js} +2 -2
- package/dist-cli/chunks/upload-UHTVCGGR.js +2 -0
- package/dist-cli/chunks/{what-happened-LFWH74FR.js → what-happened-N3AQ6I7O.js} +2 -2
- package/dist-cli/chunks/{whoami-CUF56TLP.js → whoami-FOIMN6UC.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -30
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +41 -25
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +41 -25
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-UEOLNAWJ.js +0 -2
- package/dist-cli/chunks/beta-4MD7WSI4.js +0 -2
- package/dist-cli/chunks/chunk-2ZPJHSIJ.js +0 -11
- package/dist-cli/chunks/chunk-4OHVCGMF.js +0 -2
- package/dist-cli/chunks/chunk-ERLA3F77.js +0 -1
- package/dist-cli/chunks/chunk-JMU5IGIU.js +0 -1
- package/dist-cli/chunks/chunk-KA5JJCWL.js +0 -1
- package/dist-cli/chunks/chunk-QWKO62QM.js +0 -2
- package/dist-cli/chunks/chunk-SK4SOISL.js +0 -1
- package/dist-cli/chunks/chunk-ZBOIGEGO.js +0 -5
- package/dist-cli/chunks/control-3BO54QMO.js +0 -2
- package/dist-cli/chunks/demo-app-registry-5RZCXLWB.js +0 -2
- package/dist-cli/chunks/drivers-PSQUUAYC.js +0 -2
- package/dist-cli/chunks/flow-34YCVQDB.js +0 -2
- package/dist-cli/chunks/install-AM5PTJT3.js +0 -2
- package/dist-cli/chunks/setup-repo-3BXLAX5E.js +0 -2
- package/dist-cli/chunks/store-ONX3EBS4.js +0 -2
- package/dist-cli/chunks/telemetry-MFR7TUW7.js +0 -2
- package/dist-cli/chunks/upload-H2SMWP6T.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as f}from"./chunk-MTPWS4JK.js";import{b as N}from"./chunk-SKNHJDYO.js";import{c as v,e as $,g as S}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";var A=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],x="__sootsimShellAnimationTrace",R="__sootsimDebugAnimation";function D(){console.log(`
|
|
3
3
|
sootsim debug \u2014 drive __sootsimDebug from the terminal
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -167,7 +167,7 @@ examples:
|
|
|
167
167
|
} : null,
|
|
168
168
|
samples,
|
|
169
169
|
}
|
|
170
|
-
})()`}async function l(i,c){return S(i,c)}async function z(i,c){let g=v(i,{port:c.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=g.positional;(!m[0]||i.includes("--help")||i.includes("-h"))&&(D(),process.exit(0));let C=g.wsPort,k=g.simId,n=!i.includes("--json"),y=k?` --sim ${k}`:"",_=m[0],a=m.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(_)){let{runInspect:e}=await import("./inspect-
|
|
170
|
+
})()`}async function l(i,c){return S(i,c)}async function z(i,c){let g=v(i,{port:c.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=g.positional;(!m[0]||i.includes("--help")||i.includes("-h"))&&(D(),process.exit(0));let C=g.wsPort,k=g.simId,n=!i.includes("--json"),y=k?` --sim ${k}`:"",_=m[0],a=m.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(_)){let{runInspect:e}=await import("./inspect-6FPPW7GS.js");await e(["debug",...i],{port:c.port,verbose:c.verbose});return}let o=$(g);try{switch(_){case"enable":{let e=O(a[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
171
171
|
known: ${A.join(", ")}`),process.exit(1));let t=e.map(u=>JSON.stringify(u)).join(", "),s=await l(o,`window.__sootsimDebug.enable(${t})`);console.log(r({active:s},n));break}case"disable":{let e=O(a[0]),t=e.length>0?e.map(u=>JSON.stringify(u)).join(", "):"'all'",s=await l(o,`window.__sootsimDebug.disable(${t})`);console.log(r({active:s},n));break}case"toggle":{let e=a[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let t=await l(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(r({[e]:t},n));break}case"status":{let e=await l(o,"window.__sootsimDebug.status()");console.log(r(e,n));break}case"channels":{let e=await l(o,"window.__sootsimDebug.channels()");console.log(r(e,n));break}case"flags":{let e=await l(o,"window.__sootsimDebug.flags()");console.log(r(e,n));break}case"snapshot":{let e=a[0],t=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await l(o,`(() => { const s = ${t}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(r(s,n));break}case"snapshots":{let e=await l(o,"window.__sootsimDebug.snapshots()");console.log(r(e,n));break}case"diff":{let e=a[0],t=a[1];(!e||!t)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
172
172
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(t)});
|
|
173
173
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as S}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
|
|
3
3
|
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-CB4PUMI2.js";import"./chunk-Z2PBRNJP.js";import"./chunk-GWQUPWVO.js";import{f as c,g as r,h as g}from"./chunk-ZEVZN3S4.js";import{c as d,e as l,h as a}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as v,e as R,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as v,e as R,h as b}from"./chunk-TR554AIH.js";import{b as $}from"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function A(){console.log(`
|
|
3
3
|
sootsim diagnose \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-G62Q2MQI.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-G23GIRBM.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.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,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-B4VH67D3.js";import"./chunk-G62Q2MQI.js";import{a as v,e as h}from"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import{b as f,g as u}from"./chunk-JJVZMGRM.js";import{a as p}from"./chunk-QI4VLQ3A.js";import{c as m}from"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-FX3PPKSJ.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim electron \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -15,4 +15,4 @@ examples:
|
|
|
15
15
|
sootsim electron
|
|
16
16
|
sootsim electron --port 5173
|
|
17
17
|
sootsim electron --profile qa
|
|
18
|
-
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-
|
|
18
|
+
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-EKMYRDQH.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as n,c as r,d as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-P722XCFT.js";import"./chunk-2ABGQIW7.js";import"./chunk-VIEK76DX.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as G}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-P722XCFT.js";import{a as Re,b as Ee}from"./chunk-T442FYM5.js";import{a as X,b as D,c as B,d as K,e as ce,f as oe,g as ne,h as Ce,i as De,j as he}from"./chunk-MTPWS4JK.js";import{a as Ae,e as le}from"./chunk-LNRBXCUI.js";import{b as Be,h as Le}from"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import{a as Oe}from"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import{a as ge,c as ye,d as Me}from"./chunk-PFRPXFSL.js";import{a as Te}from"./chunk-FX3PPKSJ.js";import"./chunk-G23GIRBM.js";import{c as Ne,e as _e,f as Fe,g as Pe,h as be}from"./chunk-TR554AIH.js";import{b as Ie}from"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{existsSync as vt,mkdirSync as kt,readFileSync as Tt,rmSync as je,writeFileSync as Mt}from"fs";import{tmpdir as It}from"os";import{dirname as Nt,join as _t,resolve as Ft}from"path";var re=1,Pt="SOOTSIM_INSPECT_NOTICE_PATH",At=300*1e3,Ot=15e3;function Je(){return Ft(process.env[Pt]||_t(It(),"sootsim-inspect-notice-state.json"))}function Rt(t,l){return Object.fromEntries(Object.entries(t).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&l-a.updatedAt<=At))}function Et(t){let l=Je();if(!vt(l))return{version:re,entries:{}};try{let a=JSON.parse(Tt(l,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(je(l,{force:!0}),{version:re,entries:{}}):{version:re,entries:Rt(a.entries,t)}}catch{return je(l,{force:!0}),{version:re,entries:{}}}}function Ct(t){let l=Je();kt(Nt(l),{recursive:!0}),Mt(l,JSON.stringify(t,null,2)+`
|
|
3
3
|
`)}function Dt(t,l){let a=l.trim()||"default";return`${t}:${a}`}function we(t,l,a,d={}){let u=d.nowMs??Date.now(),i=d.cooldownMs??Ot,b=Et(u),k=Dt(t,l),$=b.entries[k];return $&&$.signature===a&&u-$.updatedAt<i?!1:(b.entries[k]={signature:a,updatedAt:u},Ct(b),!0)}async function He(t,l={args:[]}){let a=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"}),d=typeof a=="number"?a:0;if(D(l.args)){B({nodes:d});return}console.log(` nodes: ${d}`)}function xe(t,l){let a=t.indexOf(l);return a>=0&&a+1<t.length?t[a+1]:null}async function qe(t){let{bridge:l,args:a,positional:d}=t,u=a.includes("--verbose")||a.includes("-v"),i=D(a),b=u&&!i,k=a.includes("--watch")||a.includes("-w"),$=1e3,N=a.includes("--compact"),h=a.includes("--no-xy"),S=xe(a,"--testid-like"),F=xe(a,"--only"),I=xe(a,"--subtree"),C=d[1],c=C?/[*?]/.test(C):!1,J=!c&&!F?C:void 0,L=F??(c?C:void 0),O=async()=>{await ce(l,{verbose:b});let Z=`(async () => {
|
|
4
4
|
const t = window.__sootsimTest
|
|
5
5
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
@@ -239,7 +239,7 @@ import{a as G}from"./chunk-JMGDVXAV.js";import{a as Re,b as Ee}from"./chunk-T5L7
|
|
|
239
239
|
`);console.log(`${o??""}
|
|
240
240
|
|
|
241
241
|
${s}
|
|
242
|
-
`),process.exit(0)}let F=u.wsPort,I=u.simId,C=u.commandTimeoutMs;if(b==="list"&&d.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-
|
|
242
|
+
`),process.exit(0)}let F=u.wsPort,I=u.simId,C=u.commandTimeoutMs;if(b==="list"&&d.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-NSCX5CRA.js"),o=e();console.log(` available drivers (${o.length}):
|
|
243
243
|
`);let s=Math.max(...o.map(n=>n.id.length),6),r=Math.max(...o.map(n=>n.kind.length),4);for(let n of o){let m=n.available?"\u2713":"\u2717",p=n.id.padEnd(s),y=n.kind.padEnd(r);console.log(` ${m} ${p} ${y} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let c=_e(u),J=I||"default",L=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]);function O(e){let o=e.displayUrl||e.url;return e.status!=null?`${e.method} ${o} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${o} -> ${e.error}`:`${e.method} ${o}`}async function H(e){let o=We()?1200:350;try{let{settled:s,elapsed:r}=await se({bridge:e,maxMs:o,pollMs:32,stablePolls:2});s||process.stderr.write(` \u26A0 auto-wait timed out after ${r??o}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
244
244
|
`)}catch{}}async function Z(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
245
245
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-FXY5FWVY.js";import"./chunk-B4VH67D3.js";import"./chunk-5HNZO5AI.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-B4VH67D3.js";import{a as x}from"./chunk-QI4VLQ3A.js";import"./chunk-VIEK76DX.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
|
|
3
3
|
`),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim install-desktop \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
23
|
+
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-SNZBIRGL.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-UD5ILFN5.js";import{d as c}from"./chunk-BEY2QVU5.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
|
|
3
3
|
created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
|
|
4
4
|
secret: ${t.secret}
|
|
5
5
|
`),console.log(` copy this now \u2014 we can't show it again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-G62Q2MQI.js";import{b as m}from"./chunk-JJVZMGRM.js";import{a as u}from"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-G23GIRBM.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
|
|
3
3
|
sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -13,4 +13,4 @@ options:
|
|
|
13
13
|
examples:
|
|
14
14
|
sootsim launch
|
|
15
15
|
sootsim launch --version 1.2.3
|
|
16
|
-
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-
|
|
16
|
+
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-GFWS3QLZ.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as f,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as f,d as m}from"./chunk-BEY2QVU5.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so desktop uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${t}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-SNZBIRGL.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-SNZBIRGL.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-SNZBIRGL.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-67K3WAEZ.js";import{a as t,c as o}from"./chunk-BEY2QVU5.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as h}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as h}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-VIEK76DX.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim preview \u2014 production-like preview
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-5XI3AB4I.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function f(){console.log(`
|
|
3
3
|
sootsim profile \u2014 manage isolated storage profiles
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as w,e as b,h as m,i as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as w,e as b,h as m,i as f}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function h(){console.log(`
|
|
3
3
|
sootsim react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as z}from"./chunk-FCOCFEBU.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-BEY2QVU5.js";import{d as W}from"./chunk-G23GIRBM.js";import{c as R,e as $}from"./chunk-TR554AIH.js";import{b as C}from"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{existsSync as Z,mkdirSync as _,readFileSync as ee,rmSync as L,writeFileSync as U}from"fs";import{tmpdir as oe}from"os";import{dirname as T,extname as re,join as te,resolve as O}from"path";var D=6e4;async function ve(e,r){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim record \u2014 capture the running sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p,b as w,c as $,d as y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p,b as w,c as $,d as y}from"./chunk-NKYTISAN.js";import{a as d}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.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-QMCX2227.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 runRuntime};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as x}from"./chunk-T442FYM5.js";import{a as v}from"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-Z2PBRNJP.js";import"./chunk-GWQUPWVO.js";import{f as m}from"./chunk-ZEVZN3S4.js";import{c as h,d as g,e as w,h as y}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{mkdirSync as R,writeFileSync as S}from"fs";import{dirname as _,resolve as B}from"path";async function W(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot \u2014 capture the canvas as a PNG
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as o}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-HNAGYNWN.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as Y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as Y}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import{b as j}from"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import{b as O}from"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as Y,c as D,d as X,e as H,f as Z,h as Q,i as w,j as ee,k as te,l as ie,p as re,s as A,t as ne,u as se,v as oe,w as ae}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as Y,c as D,d as X,e as H,f as Z,h as Q,i as w,j as ee,k as te,l as ie,p as re,s as A,t as ne,u as se,v as oe,w as ae}from"./chunk-P32FCOS3.js";import"./chunk-IE2WYVJF.js";import{a as E}from"./chunk-QD22CQLH.js";import"./chunk-E473YTRQ.js";import"./chunk-VVUEWU2P.js";import{e as z}from"./chunk-NKYTISAN.js";import{a as V,b as G}from"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import{d as q}from"./chunk-G23GIRBM.js";import"./chunk-23YMXBQ2.js";import{A as W,B as O,D as F,E as j,F as $,G as J,H as K,I as N,u as _,v as U,y as T,z as M}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{spawn as Te}from"child_process";import v from"fs";import{createServer as Ee}from"http";import S from"path";import{WebSocket as m,WebSocketServer as Ie}from"ws";import ce from"node:fs";import I from"node:path";var P=1;function ge(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(a=>Number.isFinite(a)&&a>0)}var x=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let s=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,s,n)}catch(n){n instanceof A?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await ie()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
|
|
3
3
|
`)}}close(){for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return H();case"agent:upsert-project":return D(i.input??{});case"agent:delete-project":return Q(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return ee(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-prompt":{let n=String(i.sessionId),o=w(n);if(!o)throw new A("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await se(n,r),this.notePromptAccepted(n,r,o.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await oe(String(i.sessionId));let s=w(String(i.sessionId));return s&&this.broadcastSessionStatus(s),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new A("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async doStartSession(e){if(!X(e.projectId))throw new A("NO_PROJECT",`no project: ${e.projectId}`);let i=await ne(e);return this.broadcastSessionStatus(i.session),i}async autoAttachForUrl(e){let t=e.bundleUrl??"",i=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!i)return{project:null};let s=this.opts.getExcludePorts?.()??ge(),o=(await E({excludePorts:s})).find(l=>String(l.port)===i);if(!o||!o.cwd)return{project:null};let r=H().find(l=>l.cwd===o.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],o.bundleUrl,t]));return{project:D({cwd:o.cwd,name:o.projectName??I.basename(o.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[o.cwd],knownBundleUrls:c,framework:r?.framework??Se(o.framework),bundleId:o.bundleId??r?.bundleId})}}getTranscript(e){let t=re(e);return ce.existsSync(t)?ce.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=Y();return{userDataDir:e,storeFile:I.join(e,"attached-projects.json"),sessionsDir:I.join(e,"sessions"),transcriptsDir:I.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let s=this.subscriptions.get(t);if(s)return s.refCount++,{ok:!0,refCount:s.refCount};let n=ae(t,o=>{let r=this.coalescePromptEcho(t,o);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),o.type==="turn-completed"){let c=w(t);if(c)try{Z(c.projectId,{usd:o.costUsd,ts:o.ts})}catch(d){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${d instanceof Error?d.message:String(d)}
|
|
4
4
|
`)}}});return this.subscriptions.set(t,{unsubscribe:n,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let i=this.sessionsBySocket.get(e);return!i||!i.has(t)?{ok:!0,refCount:0}:(i.delete(t),this.decrementSubscription(t))}decrementSubscription(e){let t=this.subscriptions.get(e);if(!t)return{ok:!0,refCount:0};if(t.refCount--,t.refCount<=0){try{t.unsubscribe()}catch{}return this.subscriptions.delete(e),{ok:!0,refCount:0}}return{ok:!0,refCount:t.refCount}}dropSessionFanout(e){let t=this.subscriptions.get(e);if(t){try{t.unsubscribe()}catch{}this.subscriptions.delete(e)}for(let i of this.sessionsBySocket.values())i.delete(e);this.clearPromptTracking(e)}normalizePromptEnvelope(e){if(e?.prompt&&typeof e.prompt=="object"){let t=e.prompt;return{text:String(t.text??""),...typeof t.displayText=="string"?{displayText:t.displayText}:{},...typeof t.inspectSummary=="string"?{inspectSummary:t.inspectSummary}:{},...typeof t.inspectTrace=="string"?{inspectTrace:t.inspectTrace}:{}}}return{text:String(e?.text??""),...typeof e?.displayText=="string"?{displayText:e.displayText}:{},...typeof e?.inspectSummary=="string"?{inspectSummary:e.inspectSummary}:{},...typeof e?.inspectTrace=="string"?{inspectTrace:e.inspectTrace}:{}}}notePromptAccepted(e,t,i){let s=Date.now(),n=this.pendingPromptEchoes.get(e)??[];n.push({sentAt:s}),this.pendingPromptEchoes.set(e,n);let o=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,o);let r=t.displayText??t.text;return this.patchSession(e,{lastPrompt:r,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:r,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:s}),{ok:!0,queued:o>1,pendingTurns:o,queueDepth:Math.max(0,o-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){te(e,t);let i=w(e);i&&this.broadcastSessionStatus(i)}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[s,n]of this.sessionsBySocket)if(n.has(e)&&s.readyState===P)try{s.send(i)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let i of this.allSockets)if(i.readyState===P)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===P)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===P)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function Se(a){return a==="expo"?"expo":a==="one"||a==="vxrn"?"one":"unknown"}import ye from"http";import ve from"https";var be="sootsim",we=new Set(["host","origin","referer","user-agent","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),Ae={"access-control-allow-origin":"*","access-control-allow-methods":"GET,POST,PUT,DELETE,PATCH,OPTIONS","access-control-allow-headers":"*","access-control-expose-headers":"*","access-control-max-age":"3600"};function k(a){for(let[e,t]of Object.entries(Ae))a.setHeader(e,t)}function ke(a,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return a.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function Ce(a){let e={};for(let[t,i]of Object.entries(a))i&&(we.has(t.toLowerCase())||(e[t]=Array.isArray(i)?i.join(", "):i));return e["user-agent"]=be,e}function de(a){return a?.startsWith("/__fetch-proxy?")||a?.startsWith("/__proxy?")||!1}function le(a){return a?!!(a.startsWith("/__app-api?")||a.startsWith("/__app-api/")):!1}async function ue(a,e){if(a.method==="OPTIONS"){k(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((a.url||"").split("?")[1]||"").get("url");if(!i){k(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{k(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n=Ce(a.headers),o;if(a.method!=="GET"&&a.method!=="HEAD"){let l=[];for await(let u of a)l.push(Buffer.isBuffer(u)?u:Buffer.from(u));l.length>0&&(o=Buffer.concat(l))}let r;try{r=await fetch(s.href,{method:a.method,headers:n,body:o,redirect:"follow"})}catch(l){k(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${ke(s.href,l)}`);return}r.headers.forEach((l,u)=>{let p=u.toLowerCase();p==="content-encoding"||p==="transfer-encoding"||p==="content-length"||p==="set-cookie"||p.startsWith("access-control-")||e.setHeader(u,l)}),k(e);let c=r.headers.getSetCookie?.()??[];c.length>0&&e.setHeader("x-sootsim-set-cookie",c.join(", ")),e.statusCode=r.status;let d=Buffer.from(await r.arrayBuffer());e.end(d)}function pe(a,e){let t=a.url||"",i="",s="";if(t.startsWith("/__app-api?")){let d=new URL(t,"http://sootsim.local");i=d.searchParams.get("path")||"",s=d.searchParams.get("origin")?.trim()||""}else if(t.startsWith("/__app-api/"))i=t.slice(10);else return!1;if(!s)return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: missing origin query param"),!0;if(a.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":a.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":a.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,s)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let o=n.protocol==="https:"?ve:ye,r={...a.headers};delete r.host,r.host=n.host;let c=o.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:a.method,headers:r},d=>{let l=Object.keys(d.headers).filter(u=>{let p=u.toLowerCase();return!p.startsWith("access-control-")&&p!=="set-cookie"}).join(", ");e.writeHead(d.statusCode??502,{...d.headers,"access-control-allow-origin":a.headers.origin||"*","access-control-allow-credentials":"true","access-control-expose-headers":l}),d.pipe(e)});return c.on("error",d=>{e.statusCode=502,e.end(`app proxy error: ${d.message}`)}),a.pipe(c),!0}var Pe=new Set(["tap","keyboard","close"]);function xe(a){return!a||typeof a.type!="string"?!1:a.acquireLock===!0?!0:a.readOnly===!0?!1:Pe.has(a.type)}var Re=5e3,Be=3600*1e3,Le="SOOTSIM_RUNTIME_UPDATE_INTERVAL_MS",_e={".html":"text/html; charset=utf-8",".js":"application/javascript",".cjs":"application/javascript",".mjs":"application/javascript",".css":"text/css; charset=utf-8",".json":"application/json; charset=utf-8",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".wasm":"application/wasm",".ttf":"font/ttf",".otf":"font/otf",".woff":"font/woff",".woff2":"font/woff2",".map":"application/json",".txt":"text/plain; charset=utf-8"};function he(a){let e;try{let s=_();e=JSON.stringify(s)}catch{e="{}"}let t=`<script>window.__sootsimSharedConfig=${e};</script>`,i=a.toString("utf8");return i.includes("</head>")?i.replace("</head>",t+"</head>"):i.includes("</body>")?i.replace("</body>",t+"</body>"):t+i}var R=class a{port;openUrlHandler;httpServer=null;wss=null;nextCommandId=1;nextSimNumber=161;sims=new Map;primarySimId=null;pendingCommands=new Map;cliBySentId=new Map;cliSimBySocket=new Map;cliLastCommandAt=new Map;cliIdentityKeyBySocket=new Map;cliLabelBySocket=new Map;restorableSims=new Map;nextCliFallbackId=1;cliIdleTimer=null;agentHost;static CLI_IDLE_TIMEOUT_MS=6e4;static CLI_LEASE_TTL_MS=6e5;static USER_ACTIVE_LEASE_TTL_MS=8e3;static USER_BOOT_LEASE_TTL_MS=6e4;static SIM_RECONNECT_TTL_MS=3e4;preferredPort;portFallbackCount;shouldWriteLockfile;effectivePort=0;startedAt=0;heartbeatTimer=null;wsHeartbeatTimer=null;wsIsAlive=new WeakMap;static WS_HEARTBEAT_INTERVAL_MS=3e4;runtimeUpdateTimer=null;runtimeUpdateInFlight=null;activeRuntimeVersion=null;activeRuntimeDirPath=null;scanCache=null;scanCacheAt=0;inflightScan=null;static SCAN_FRESH_MS=2e3;constructor(e={}){this.preferredPort=e.port||7668,this.port=this.preferredPort,this.shouldWriteLockfile=e.writeLockfile===!0,this.portFallbackCount=Math.max(1,e.portFallbackCount??10),this.openUrlHandler=e.openUrl,this.agentHost=new x({getExcludePorts:e.agentScanExcludes})}getAgentHost(){return this.agentHost}start(e){this.startAsync(e)}async startAsync(e){if(this.httpServer||this.wss)return this.effectivePort;this.refreshActiveRuntime();for(let t=0;t<this.portFallbackCount;t++){let i=this.preferredPort+t;try{return await this.bindOnce(i,e?.silent===!0),this.effectivePort=i,this.port=i,this.startedAt=Date.now(),t>0&&!e?.silent&&process.stderr.write(`ws bridge bound to port ${i} (preferred ${this.preferredPort} was taken)
|
|
5
5
|
`),this.afterBind(),i}catch(s){if(s?.code!=="EADDRINUSE")throw s;e?.silent||process.stderr.write(`ws bridge port ${i} already in use, trying ${i+1}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-FXY5FWVY.js";import"./chunk-B4VH67D3.js";import"./chunk-5HNZO5AI.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{a as runSetupRepo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-VIEK76DX.js";import*as l from"fs";import*as i from"path";import{fileURLToPath as f}from"url";function g(){try{let s=f(import.meta.resolve("sootsim/package.json"));return i.join(i.dirname(s),"skills")}catch{let s=i.dirname(f(import.meta.url));return i.resolve(s,"../../skills")}}var m=g();function d(s){let n=s.match(/^---\n([\s\S]*?)\n---/);if(!n)return null;let e=n[1],o=e.match(/^name:\s*(.+)$/m),r=e.match(/^description:\s*(.+)$/m);return o?{name:o[1].trim(),description:r?.[1]?.trim()||""}:null}function p(){if(!l.existsSync(m))return[];let s=l.readdirSync(m).filter(e=>e.endsWith(".md")),n=[];for(let e of s){let o=l.readFileSync(i.join(m,e),"utf8"),r=d(o);r&&n.push({...r,filename:e})}return n}function u(s,n){let e=i.join(m,s.filename),o=i.join(n,s.filename);l.copyFileSync(e,o),console.log(` copied ${s.name} \u2192 ${o}`)}async function h(s){if(s.includes("--list")||s.includes("-l")||s.length===0){let t=p();if(t.length===0){console.log(" no skills found");return}console.log(`
|
|
3
3
|
available skills:
|
|
4
4
|
`);for(let c of t)console.log(` ${c.name}`),console.log(` ${c.description}
|
|
5
5
|
`);console.log(" usage: sootsim skills <target-dir> [skill-name...]"),console.log(" example: sootsim skills ./my-project"),console.log(` example: sootsim skills ./my-project debug perf
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as _}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as _}from"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import{E as b,F as v,i as D,y as O,z as $}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{spawn as N}from"child_process";import{existsSync as F}from"fs";import{WebSocket as B}from"ws";var k=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var A={reset:"\x1B[0m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",cyan:"\x1B[36m",bold:"\x1B[1m"};function T(){return process.stderr.isTTY===!0}function l(t,e){return T()?`${A[t]}${e}${A.reset}`:e}function L(t,e){switch(t){case"pending":return l("dim","\xB7");case"running":return l("cyan",e);case"done":return l("green","\u2713");case"fail":return l("red","\u2717");case"skip":return l("yellow","\u25CB")}}var E=class{constructor(e,s){this.stepper=e;this.data=s}start(e){this.data.state="running",e!==void 0&&(this.data.detail=e),this.stepper.render()}update(e){this.data.detail=e,this.stepper.render()}done(e){this.data.state="done",e!==void 0&&(this.data.detail=e),this.stepper.render()}fail(e){this.data.state="fail",e!==void 0&&(this.data.detail=e),this.stepper.render()}skip(e){this.data.state="skip",e!==void 0&&(this.data.detail=e),this.stepper.render()}},S=class{steps=[];bannerText="";frame=0;timer=null;lastLineCount=0;paused=!1;finished=!1;banner(e){this.bannerText=e}add(e){let s={label:e,state:"pending"};return this.steps.push(s),new E(this,s)}render(){this.paused||this.finished||(this.startSpinner(),this.draw())}pause(){this.paused||(this.paused=!0,this.stopSpinner(),this.eraseRendered(),this.lastLineCount=0)}resume(){this.paused&&(this.paused=!1,this.draw(),this.startSpinner())}finish(){this.finished||(this.finished=!0,this.stopSpinner(),this.draw())}startSpinner(){this.timer||!T()||this.steps.some(e=>e.state==="running")&&(this.timer=setInterval(()=>{this.frame=(this.frame+1)%k.length,this.draw()},80),this.timer?.unref?.())}stopSpinner(){this.timer&&(clearInterval(this.timer),this.timer=null)}draw(){if(!T()){this.drawForwardOnly();return}this.eraseRendered();let e=[];this.bannerText&&(e.push(l("bold",this.bannerText)),e.push(""));let s=k[this.frame],i=Math.max(...this.steps.map(r=>r.label.length),0);for(let r of this.steps){let n=L(r.state,s),u=r.label.padEnd(i),y=r.detail?` ${l("dim",r.detail)}`:"";e.push(` ${n} ${u}${y}`)}process.stderr.write(e.join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`),this.lastLineCount=e.length,this.steps.some(r=>r.state==="running")||this.stopSpinner()}bannerPrinted=!1;lastEmitted=new Map;drawForwardOnly(){this.bannerText&&!this.bannerPrinted&&(process.stderr.write(this.bannerText+`
|
|
5
5
|
|
|
@@ -18,6 +18,6 @@ usage:
|
|
|
18
18
|
options:
|
|
19
19
|
--port <n> bridge port (default: ${7668})
|
|
20
20
|
--no-open don't open the browser at the end
|
|
21
|
-
`);return}O();let s=t.indexOf("--port"),i=s>=0&&t[s+1]?Number(t[s+1]):e.port??7668;Number.isNaN(i)&&(console.error(` invalid --port value: ${t[s+1]}`),process.exit(1));let r=t.includes("--no-open"),n=new S,{IS_BETA:u,BETA_TAGLINE:y}=await import("./beta-
|
|
21
|
+
`);return}O();let s=t.indexOf("--port"),i=s>=0&&t[s+1]?Number(t[s+1]):e.port??7668;Number.isNaN(i)&&(console.error(` invalid --port value: ${t[s+1]}`),process.exit(1));let r=t.includes("--no-open"),n=new S,{IS_BETA:u,BETA_TAGLINE:y}=await import("./beta-AK25X3AU.js");n.banner(u?`sootsim \u2014 ${y}`:"sootsim \u2014 starting up");let c=n.add("runtime"),d=n.add("server"),x=n.add("ready"),f=n.add("open");n.render();let g=null;try{c.start("checking\u2026");let a=$();if(a&&F(D(a)))g=a,c.done(`v${a}`);else{c.start("downloading engine (~6 MB)\u2026");let{runRuntime:h}=await import("./runtime-GFWS3QLZ.js");n.pause(),await h(["install"],{}),n.resume(),g=$(),c.done(g?`v${g}`:"installed")}}catch(a){c.fail(m(a)),n.finish(),process.exit(1)}let o=i,p="standalone";try{d.start("checking\u2026");let a=b();if(v(a)&&await P(a.bridgePort,800))o=a.bridgePort,p="daemon-existing",d.done(`already running (port ${o})`);else if(process.platform==="darwin"||process.platform==="linux"){d.start("registering background daemon\u2026");try{let{daemonInstall:h}=await import("./daemon-2Z4DAJT6.js");n.pause(),await h({port:i,force:!0}),n.resume();let R=b();o=v(R)?R.bridgePort:i,p="daemon-installed",d.done(`daemon registered (port ${o})`)}catch(h){n.resume(),d.start("daemon unavailable, starting standalone server\u2026"),o=await C(i),p="standalone",d.done(`standalone (port ${o}) \u2014 ${m(h)}`)}}else d.start("starting standalone server\u2026"),o=await C(i),p="standalone",d.done(`standalone (port ${o})`)}catch(a){d.fail(m(a)),n.finish(),process.exit(1)}try{if(x.start("waiting for bridge\u2026"),!await V(o,U))throw new Error(`bridge never came online on port ${o}`);x.done(`ws://localhost:${o}`)}catch(a){x.fail(m(a)),n.finish(),process.exit(1)}let w=`http://localhost:${o}/`;if(r){f.skip(w),n.finish();return}try{f.start("launching browser\u2026"),await _(w),f.done(w)}catch(a){f.skip(`${w} (open it manually \u2014 ${m(a)})`)}n.finish(),p==="standalone"?(console.log(`
|
|
22
22
|
running in standalone mode. sootsim will exit when this process does.
|
|
23
23
|
press ctrl-c to stop.`),await new Promise(()=>{})):p==="daemon-installed"&&console.log("\n installed as a background daemon \u2014 it'll restart on login.\n manage it with `sootsim daemon status / restart / uninstall`.")}function P(t,e){return new Promise(s=>{let i=new B(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),r=!1,n=u=>{if(!r){r=!0;try{i.close()}catch{}s(u)}};i.once("open",()=>n(!0)),i.once("error",()=>n(!1)),setTimeout(()=>n(!1),e)})}async function V(t,e){let s=Date.now()+e;for(;Date.now()<s;){if(await P(t,500))return!0;await new Promise(i=>setTimeout(i,200))}return!1}async function C(t){let e=W();N(e,["server","--quiet","--port",String(t)],{detached:!0,stdio:"ignore",env:process.env}).unref();let i=Date.now()+I;for(;Date.now()<i;){let r=b();if(v(r))return r.bridgePort;await new Promise(n=>setTimeout(n,150))}if(await P(t,800))return t;throw new Error(`standalone server didn't come online within ${Math.round(I/1e3)}s`)}function W(){let t=process.argv[1];return t&&F(t)?t:"sootsim"}function m(t){return t instanceof Error?t.message:String(t)}export{Z as runStart};
|