sootsim 0.1.193 → 0.1.194
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-USE53A6G.js → agent-CM42FXZ2.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-NNPLVD2D.js → agent-wrapper-RTNUXAUA.js} +2 -2
- package/dist-cli/chunks/{app-fonts-K6BJQ5PV.js → app-fonts-GRO4JNA7.js} +2 -2
- package/dist-cli/chunks/{assert-OBYCJT6E.js → assert-KOOROQJI.js} +2 -2
- package/dist-cli/chunks/{auth-QAZ3NU2P.js → auth-ASS7OY74.js} +2 -2
- package/dist-cli/chunks/beta-G6FAR5KL.js +2 -0
- package/dist-cli/chunks/{camera-ND7VAW2Z.js → camera-LPPMHGJQ.js} +2 -2
- package/dist-cli/chunks/{chunk-R62P6SPR.js → chunk-454SCBS7.js} +2 -2
- package/dist-cli/chunks/{chunk-ICI5UOHJ.js → chunk-4YYFY5HM.js} +1 -1
- package/dist-cli/chunks/{chunk-3RKAEUTW.js → chunk-5WHIIC72.js} +2 -2
- package/dist-cli/chunks/{chunk-UG44WJ5U.js → chunk-63GQM7YC.js} +2 -2
- package/dist-cli/chunks/{chunk-HRH5AL5T.js → chunk-6RARYOEL.js} +2 -2
- package/dist-cli/chunks/{chunk-ZMYHC2GZ.js → chunk-7CNBR64U.js} +1 -1
- package/dist-cli/chunks/{chunk-XX5ABTZE.js → chunk-CGC6VL3E.js} +1 -1
- package/dist-cli/chunks/{chunk-73RUAURY.js → chunk-CQPAW4BG.js} +2 -2
- package/dist-cli/chunks/chunk-DJSMPGAY.js +1 -0
- package/dist-cli/chunks/{chunk-HNBFCX26.js → chunk-DZCTXHGC.js} +2 -2
- package/dist-cli/chunks/{chunk-HFKXGD6F.js → chunk-EKLBXHUK.js} +1 -1
- package/dist-cli/chunks/{chunk-2H5WTYZB.js → chunk-EZCGWPX4.js} +1 -1
- package/dist-cli/chunks/{chunk-KNPIQNLB.js → chunk-FFR4USO5.js} +2 -2
- package/dist-cli/chunks/{chunk-EBRAQH3D.js → chunk-H6CPDHFG.js} +3 -3
- package/dist-cli/chunks/{chunk-3FZ2YUUP.js → chunk-HSC4YJX7.js} +2 -2
- package/dist-cli/chunks/{chunk-OOGJDQMT.js → chunk-HU4ZXOLS.js} +1 -1
- package/dist-cli/chunks/{chunk-2OCQ4XLZ.js → chunk-I7YBEJW2.js} +2 -2
- package/dist-cli/chunks/{chunk-XNCFZ4UT.js → chunk-IKNJYCUF.js} +1 -1
- package/dist-cli/chunks/{chunk-WT4SBY54.js → chunk-IXLWH3XE.js} +4 -4
- package/dist-cli/chunks/{chunk-2YZKJ3ZJ.js → chunk-JOFQ67LV.js} +1 -1
- package/dist-cli/chunks/{chunk-EYUZLNLC.js → chunk-JPWVEJEC.js} +1 -1
- package/dist-cli/chunks/chunk-JQYDRLG5.js +1 -0
- package/dist-cli/chunks/{chunk-3HZLGWTB.js → chunk-JVJJWIDH.js} +3 -3
- package/dist-cli/chunks/{chunk-3HBRJVSY.js → chunk-K5IZM7I5.js} +1 -1
- package/dist-cli/chunks/{chunk-TYYWETOW.js → chunk-LCX3R5GU.js} +2 -2
- package/dist-cli/chunks/{chunk-PSP2WT3K.js → chunk-LDWXDKXP.js} +1 -1
- package/dist-cli/chunks/{chunk-ZWFFRBAR.js → chunk-NBT3VVSY.js} +2 -2
- package/dist-cli/chunks/{chunk-BQSG37WI.js → chunk-NQCAVMZZ.js} +2 -2
- package/dist-cli/chunks/{chunk-ZUV7FVK5.js → chunk-NZCCIUPD.js} +2 -2
- package/dist-cli/chunks/{chunk-JFURKF6W.js → chunk-P5VG36UG.js} +2 -2
- package/dist-cli/chunks/{chunk-UPP423YA.js → chunk-PIK54AHY.js} +2 -2
- package/dist-cli/chunks/{chunk-32JBVYL5.js → chunk-QWZBLVT4.js} +1 -1
- package/dist-cli/chunks/{chunk-QS73KI7T.js → chunk-RM4Q4CME.js} +1 -1
- package/dist-cli/chunks/{chunk-I25N6TF4.js → chunk-SIQUJOVP.js} +2 -2
- package/dist-cli/chunks/{chunk-U2QSYQUZ.js → chunk-TC34NFOE.js} +1 -1
- package/dist-cli/chunks/{chunk-VGICXM2C.js → chunk-V4U35I2X.js} +2 -2
- package/dist-cli/chunks/{chunk-6WL7GBOW.js → chunk-YFT6QNH3.js} +1 -1
- package/dist-cli/chunks/{chunk-RHKQEMHY.js → chunk-YZD3FUOU.js} +2 -2
- package/dist-cli/chunks/{chunk-7LAHDYZ3.js → chunk-Z2VLPNTW.js} +1 -1
- package/dist-cli/chunks/{chunk-2G4WS3NS.js → chunk-ZKV5SZCW.js} +2 -2
- package/dist-cli/chunks/{chunk-WS4H3OTZ.js → chunk-ZXTNCFPG.js} +3 -3
- package/dist-cli/chunks/cli-version-L74S57R3.js +2 -0
- package/dist-cli/chunks/{compat-FFXRTXLA.js → compat-7T7W3OC2.js} +3 -3
- package/dist-cli/chunks/{config-DSWOQ6FW.js → config-UMBFP5RC.js} +2 -2
- package/dist-cli/chunks/{control-CWME7T7P.js → control-IC2NOIT3.js} +2 -2
- package/dist-cli/chunks/daemon-PCQPUR6K.js +2 -0
- package/dist-cli/chunks/{debug-4TEW5NVC.js → debug-GTIWLJJM.js} +3 -3
- package/dist-cli/chunks/{desktop-UTUIQSY5.js → desktop-3P4KTBZ6.js} +3 -3
- package/dist-cli/chunks/{detox-QKN3QWEU.js → detox-HCQMS3NM.js} +2 -2
- package/dist-cli/chunks/{device-FIUY3FPI.js → device-7FBDA6PX.js} +2 -2
- package/dist-cli/chunks/{diagnose-2SB3E6PB.js → diagnose-PETKX4PH.js} +2 -2
- package/dist-cli/chunks/drivers-LY2JUEY7.js +2 -0
- package/dist-cli/chunks/flow-7DF6U3ID.js +2 -0
- package/dist-cli/chunks/help-PXW7E7CP.js +2 -0
- package/dist-cli/chunks/{home-paths-KMZQH425.js → home-paths-WB64RMAZ.js} +2 -2
- package/dist-cli/chunks/inspect-65JGU7SX.js +2 -0
- package/dist-cli/chunks/install-desktop-G4BHZ4HW.js +2 -0
- package/dist-cli/chunks/{login-PYS2PAFC.js → login-M2GVH7KT.js} +4 -4
- package/dist-cli/chunks/{logout-IUYFHCSL.js → logout-52H5QYAR.js} +2 -2
- package/dist-cli/chunks/{maestro-PXDF2QPV.js → maestro-G7YGMCVS.js} +2 -2
- package/dist-cli/chunks/{mode-D2UYKUXM.js → mode-SZKIDZVN.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-DUIJDZXH.js +2 -0
- package/dist-cli/chunks/{perf-6TPVXFHZ.js → perf-5QN2GXUG.js} +2 -2
- package/dist-cli/chunks/{record-BGGZBLUP.js → record-LNYLU7SU.js} +3 -3
- package/dist-cli/chunks/runtime-S74NISZH.js +2 -0
- package/dist-cli/chunks/{screenshot-command-UIF7HN7F.js → screenshot-command-A5U6EWBL.js} +2 -2
- package/dist-cli/chunks/{serve-AGSFVT5G.js → serve-B3H4W7FQ.js} +2 -2
- package/dist-cli/chunks/{setup-4CZ54EJ6.js → setup-P27VDHJN.js} +3 -3
- package/dist-cli/chunks/{skills-VYTEBBCP.js → skills-VYXXJXES.js} +2 -2
- package/dist-cli/chunks/{storage-ZXVK3T5Y.js → storage-5RS7F336.js} +2 -2
- package/dist-cli/chunks/store-VYO4FWD5.js +2 -0
- package/dist-cli/chunks/telemetry-BKSSASRW.js +2 -0
- package/dist-cli/chunks/{test-JOX7MZ67.js → test-2NPQK3UG.js} +5 -5
- package/dist-cli/chunks/{timeline-M4FXQUII.js → timeline-NTNC5Q3Z.js} +2 -2
- package/dist-cli/chunks/{upgrade-WS4EUZ5H.js → upgrade-MS6NV4ZZ.js} +2 -2
- package/dist-cli/chunks/upload-JUANX7G7.js +2 -0
- package/dist-cli/chunks/{version-UCCC26QU.js → version-NJWSIVF7.js} +2 -2
- package/dist-cli/chunks/{web-OP75SZAL.js → web-7UB25AI6.js} +2 -2
- package/dist-cli/chunks/{what-happened-IED7SETG.js → what-happened-YY6QNNFX.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/soot/SKILL.md +3 -3
- package/skills/sootsim-debug/SKILL.md +1 -1
- package/skills/sootsim-test/SKILL.md +1 -1
- package/dist-cli/chunks/beta-XH6NPFJL.js +0 -2
- package/dist-cli/chunks/chunk-ODWHC4OS.js +0 -1
- package/dist-cli/chunks/chunk-VA6U55D3.js +0 -1
- package/dist-cli/chunks/cli-version-NE74BKVQ.js +0 -2
- package/dist-cli/chunks/daemon-ZCLZ7Q2G.js +0 -2
- package/dist-cli/chunks/drivers-ZMTRO2H7.js +0 -2
- package/dist-cli/chunks/flow-YUB6NHPN.js +0 -2
- package/dist-cli/chunks/help-2RQGMWFZ.js +0 -2
- package/dist-cli/chunks/inspect-XIR5LHB4.js +0 -2
- package/dist-cli/chunks/install-desktop-RQ6PDFCW.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-DINFQX6N.js +0 -2
- package/dist-cli/chunks/runtime-7DFYO5OG.js +0 -2
- package/dist-cli/chunks/store-A5FTY6OM.js +0 -2
- package/dist-cli/chunks/telemetry-C2D5VTOD.js +0 -2
- package/dist-cli/chunks/upload-QIGILLTV.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as de,c as ce,d as ue,e as Ke,f as pe,g as he,h as qe,i as fe,j as ze}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as de,c as ce,d as ue,e as Ke,f as pe,g as he,h as qe,i as fe,j as ze}from"./chunk-IXLWH3XE.js";import{a as Ge}from"./chunk-454SCBS7.js";import{a as Xe}from"./chunk-YZD3FUOU.js";import{a as Ye}from"./chunk-NQCAVMZZ.js";import{h as je,p as Ue,r as Ve,v as Je}from"./chunk-6RARYOEL.js";import{f as Me}from"./chunk-I7YBEJW2.js";import{a as Oe}from"./chunk-JPWVEJEC.js";import{h as Le,m as He}from"./chunk-DZCTXHGC.js";import{I as se,m as _e,n as De,o as Be,p as Ce}from"./chunk-RM4Q4CME.js";import{g as ae,h as le,i as Ne}from"./chunk-HSC4YJX7.js";import{a as We}from"./chunk-LDWXDKXP.js";import{a as ke,b as re}from"./chunk-P5VG36UG.js";import{d as oe,e as Re}from"./chunk-7CNBR64U.js";import{g as Pe,h as Ae}from"./chunk-IKNJYCUF.js";import*as C from"fs";import{tmpdir as rt}from"os";import*as b from"path";import*as v from"fs";import*as y from"path";var gt=52,me=18,ge=42,Ze=96,we=54,wt=1.5,yt="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",Qe=1;function bt(r){let e=Ae(r),t=e.scale,i=!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=i?e.width+me*2:e.width+32,s=i?e.height+ge+Ze:e.height+32,l=9.5,h=Qe,p=a+l*2,g=s+Qe*2,A=l+(i?me:16),m=i?ge:16,R=i?gt:e.cornerRadius+16,U=[{side:"right",top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:r,renderScale:t,outerWidth:Math.round(p*t),outerHeight:Math.round(g*t),logicalOuterWidth:p,logicalOuterHeight:g,logicalFrameWidth:a,logicalFrameHeight:s,logicalFrameLeft:l,logicalFrameTop:h,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:A,logicalScreenTop:m,logicalScreenRadius:i?0:e.cornerRadius,logicalFrameRadius:R,frameBackground:i?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:i?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:i?null:yt,buttons:U,legacyHomeButton:i?{top:ge+e.height+(Ze-we)/2,left:e.width/2-we/2+me,size:we,ring:wt}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function vt(r){let e=r.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
|
|
3
3
|
<div
|
|
4
4
|
aria-hidden="true"
|
|
5
5
|
style="
|
|
@@ -559,7 +559,7 @@ flow extension:
|
|
|
559
559
|
})()`}),console.log(` captured ${P.length} partial replay events`)}catch(d){console.warn(` event recorder stop failed: ${d?.message||String(d)}`)}console.error(`
|
|
560
560
|
x failed: ${u.message}
|
|
561
561
|
`),k&&(console.log(" partial profile:"),nt(k)),x&&console.log(` partial video: ${x}`);try{let d=c.lastFailedStep,w=d?`step-${String(d.index+1).padStart(2,"0")}-${d.kind}`:"unstaged",_=b.join(s,w);await c.captureFailureBundle(_,{error:u,stepIndex:d?.index,stepKind:d?.kind,stepTarget:d?.target}),console.log(` failure bundle: ${_}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(d){try{let w=b.join(s,"error.png");await c.captureFailureScreenshot(w),console.log(` error screenshot: ${w}`)}catch{}console.log(` (failure bundle capture failed: ${d instanceof Error?d.message:String(d)})`)}await He(E,{errorsCommand:`sootsim get errors 5${c.simId?` --sim ${c.simId}`:""}`,warningsCommand:`sootsim get warnings 5${c.simId?` --sim ${c.simId}`:""}`,requestsCommand:`sootsim get requests 5${c.simId?` --sim ${c.simId}`:""}`}),G=1}finally{E.close()}if(m&&(G===0||x||P))try{let u=await Lt(P??[]),d=["--origin",R,"--events",u];U&&d.push("--public-origin",U),x&&d.push("--video",x),x&&M&&Number.isFinite(M)&&(d.push("--video-duration-ms",String(Math.round(M))),d.push("--recorded-duration-ms",String(Math.round(M))));let w=c.getLastRecordingStartedAtMs();w&&Number.isFinite(w)&&d.push("--recording-started-at-ms",String(Math.round(w))),c.simId&&d.push("--sim",c.simId),st&&d.push("--open"),ve&&d.push("--owner",ve),Se&&d.push("--repo",Se),N&&d.push("--billing-kind",N),console.log(`
|
|
562
|
-
preparing preview upload\u2026`);let{runUpload:_}=await import("./upload-
|
|
562
|
+
preparing preview upload\u2026`);let{runUpload:_}=await import("./upload-JUANX7G7.js");be=await _(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),G=1}return ie?(c.simId&&ne.add(c.simId),await Nt(S.wsPort,S.commandTimeoutMs,[...ne])):c.simId&&c.simId!==J&&Re(c.simId),await re(),G}async function Nt(r,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let n=le(r,{commandTimeoutMs:e});try{let o=await n.listSims(),a=i.filter(l=>o.some(h=>h.id===l&&h.readyState==="open"));if(a.length===0)return;let s=await Je(n,r,e,a);await Ue(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Lt(r){let{gzipSync:e}=await import("zlib"),t=r.map(o=>JSON.stringify(o)).join(`
|
|
563
563
|
`)+(r.length?`
|
|
564
564
|
`:""),i=e(Buffer.from(t,"utf8")),n=b.join(rt(),`sootsim-events-${Date.now()}.jsonl.gz`);return C.writeFileSync(n,i),console.log(` events: ${r.length} written to ${n} (${i.length} bytes gz)`),n}async function Ht(r){let e=r[0],t=i=>r.find((n,o)=>r[o-1]===i);switch(e){case"start":{let{path:i,state:n}=Ke();console.log(" flow draft started"),console.log(` session: ${i}`),console.log(` steps: ${n.steps.length}`);return}case"keep":case"good":{let i=he();if(i.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!i.kept){console.log(" no pending action to keep");return}console.log(` kept: ${i.candidate.summary}`),console.log(` steps: ${i.stepCount}`);return}case"end":{let i=t("--output")||(r[1]&&!r[1].startsWith("-")?r[1]:void 0),n=r.includes("--validate")||r.includes("--video"),o=r.includes("--video"),a=he();a.active&&a.kept&&console.log(` auto-kept trailing action: ${a.candidate.summary}`);let s=qe(i||(n?jt():void 0));if(s.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!s.valid){console.error(" flow draft is not valid:");for(let l of s.issues)console.error(` - ${l}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(n){let l=Ut(r,s.outputPath),h=await ot(l);if(h!==0){console.error(`
|
|
565
565
|
validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=h;return}pe(),console.log(` flow draft validated (${s.stepCount} step${s.stepCount===1?"":"s"})`),s.outputPath&&console.log(` saved: ${s.outputPath}`),o&&console.log(" video: recorded during validation run");return}if(pe(),console.log(` flow draft ended (${s.stepCount} step${s.stepCount===1?"":"s"})`),s.outputPath){console.log(` saved: ${s.outputPath}`),console.log(` next: sootsim flow ${s.outputPath} --record`);return}console.log(""),process.stdout.write(s.yaml);return}case"validate":{let i=r[1];(!i||i.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let n=ue(i);if(n.length>0){console.error(` x ${i} failed validation:`);for(let o of n)console.error(` - ${o}`);process.exit(1)}console.log(` + ${i} looks valid`);return}}}function Wt(r){return r[0]==="--sim"&&r.length>=2?[...r.slice(2),"--sim",r[1]]:r}async function Si(r){let e=Wt(r),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await Ht(e),0;let i=await ot(e);return i!==0&&(process.exitCode=i),i}function nt(r){console.log(""),ze(r)}function jt(){return b.join(rt(),`sootsim-flow-draft-${Date.now()}.yaml`)}function Ut(r,e){if(!e)throw new Error("validated flow draft requires an output path");let t=[e];for(let i=1;i<r.length;i++){let n=r[i];if(!(n==="--validate"||n==="--video")){if(n==="--output"){i+=1;continue}i===1&&!n.startsWith("-")||t.push(n)}}return!t.includes("--record")&&r.includes("--video")&&t.push("--record"),t}export{et as a,xt as b,vi as c,Ct as d,ot as e,Wt as f,Si as g};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-HU4ZXOLS.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim compat \u2014 check package compatibility
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -20,7 +20,7 @@ examples:
|
|
|
20
20
|
sootsim compat react-native-reanimated
|
|
21
21
|
sootsim compat --json
|
|
22
22
|
sootsim compat --brief
|
|
23
|
-
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-
|
|
23
|
+
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-7UB25AI6.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-7UB25AI6.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
|
|
24
24
|
sootsim compatibility report
|
|
25
25
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as i,B as s,x as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as i,B as s,x as t}from"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
|
|
3
3
|
sootsim config \u2014 manage local CLI preferences
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-NZCCIUPD.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-63GQM7YC.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-SIQUJOVP.js";import"./chunk-CQPAW4BG.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-EZCGWPX4.js";import"./chunk-K5IZM7I5.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{f,m as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-DZCTXHGC.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-RM4Q4CME.js";import{g as D,i as O,k as x}from"./chunk-HSC4YJX7.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
|
|
3
3
|
sootsim debug \u2014 drive __sootsimDebug from the terminal
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -170,7 +170,7 @@ examples:
|
|
|
170
170
|
} : null,
|
|
171
171
|
samples,
|
|
172
172
|
}
|
|
173
|
-
})()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-
|
|
173
|
+
})()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-65JGU7SX.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
174
174
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
175
175
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
176
176
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-JVJJWIDH.js";import{a as v,h as k}from"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import{a as u}from"./chunk-CGC6VL3E.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-JQYDRLG5.js";import{b as m,g as f,l as h}from"./chunk-PIK54AHY.js";import{a as c}from"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-NZCCIUPD.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim desktop \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -16,7 +16,7 @@ examples:
|
|
|
16
16
|
sootsim desktop --port 5173
|
|
17
17
|
sootsim desktop --profile qa
|
|
18
18
|
sootsim desktop --driver system
|
|
19
|
-
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-
|
|
19
|
+
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-G4BHZ4HW.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
|
|
20
20
|
sootsim desktop \u2014 launch or install the desktop companion
|
|
21
21
|
|
|
22
22
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as S}from"./chunk-ZXTNCFPG.js";import"./chunk-IXLWH3XE.js";import"./chunk-454SCBS7.js";import"./chunk-YZD3FUOU.js";import"./chunk-NQCAVMZZ.js";import"./chunk-NBT3VVSY.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.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.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-DJSMPGAY.js";import{g as d,i as l,l as a}from"./chunk-HSC4YJX7.js";import"./chunk-NZCCIUPD.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import{g as c,h as r,i as g}from"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as E,i as R,l as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as E,i as R,l as b}from"./chunk-HSC4YJX7.js";import"./chunk-YFT6QNH3.js";import{b as v}from"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
3
3
|
sootsim get diagnosis \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-JQYDRLG5.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c,d,e,f,g}from"./chunk-ZXTNCFPG.js";import{c as a,d as b}from"./chunk-IXLWH3XE.js";import"./chunk-454SCBS7.js";import"./chunk-YZD3FUOU.js";import"./chunk-NQCAVMZZ.js";import"./chunk-NBT3VVSY.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";export{d as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,f as hoistLeadingSimFlag,a as parseFlowFile,g as runFlow,e as runFlowPlayback,b as validateFlowFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-SIQUJOVP.js";import"./chunk-CQPAW4BG.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-EZCGWPX4.js";import"./chunk-K5IZM7I5.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{j as a,k as b}from"./chunk-IXLWH3XE.js";import"./chunk-454SCBS7.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";export{a as printShellPerfReport,b as runInspect};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as g,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as g,d as m}from"./chunk-V4U35I2X.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";import{exec as O}from"node:child_process";import{randomBytes as S}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function L(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${r}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-BKSSASRW.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=S(16).toString("hex"),i=await new Promise(o=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,$=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:$}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-BKSSASRW.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-BKSSASRW.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-P5VG36UG.js";import{a as t,c as o}from"./chunk-V4U35I2X.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{e as w,f as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as w,f as v}from"./chunk-ZXTNCFPG.js";import{c as y}from"./chunk-IXLWH3XE.js";import{a as h}from"./chunk-454SCBS7.js";import"./chunk-YZD3FUOU.js";import"./chunk-NQCAVMZZ.js";import"./chunk-NBT3VVSY.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g,i as m,l as N,m as R}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g,i as m,l as N,m as R}from"./chunk-HSC4YJX7.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";function I(o){let e=o[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function h(o,e,n){let r=g(o,{port:e.port}),a=I(r.positional),l=m({...r,commandTimeoutMs:5e3});try{let c=!!(await N(l,"SootSim.bridges.settings.get"))?.[n.modeKey],s=a==="on"?!0:a==="off"?!1:!c;if(c===s)return console.log(` ${n.displayName}: already ${s?"on":"off"}`),{current:c,target:s,changed:!1};if(!await l.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(n.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(s)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{k as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{k as x}from"./chunk-IXLWH3XE.js";import"./chunk-454SCBS7.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import{g as R,i as N,l as d,m as S}from"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";import{mkdirSync as W,writeFileSync as A}from"fs";import{dirname as J,resolve as B}from"path";import{WebSocket as E}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new E(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,l)=>{this.pending.set(n,{res:s,rej:l}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(w(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(w(e,"--sample-interval")??"0.1"),n=Number(w(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=w(e,"--match")??"/rn/",l=w(e,"--output")??w(e,"-o"),i=B(process.cwd(),l??"/tmp/sootsim.cpuprofile"),a=[];try{a=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return U(n),1}let f=a.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${a.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),W(J(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(A(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of _(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function U(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function _(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,l=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(l)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(l,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function w(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
|
|
3
3
|
sootsim perf react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P}from"./chunk-YZD3FUOU.js";import"./chunk-NQCAVMZZ.js";import{a as Z,c as ee}from"./chunk-NBT3VVSY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import{g as b,i as v,j as Q}from"./chunk-HSC4YJX7.js";import{d as Y}from"./chunk-JOFQ67LV.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-YFT6QNH3.js";import{b as X}from"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(e,r,o,i){let t=Math.max(2e4,i+$e);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
|
|
3
3
|
the capture lock auto-releases, so simply retry the recording.
|
|
4
4
|
if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording|lock already held/i.test(s)&&(console.error(` ${o} failed: ${s}
|
|
5
5
|
a prior recording was abandoned and its capture is still
|
|
6
6
|
releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
|
|
7
|
-
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),xe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}function re(e){let r=l(e,"--owner")?.trim(),o=l(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),r&&o?{owner:r,repo:o}:null}async function qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-
|
|
7
|
+
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),xe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}function re(e){let r=l(e,"--owner")?.trim(),o=l(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),r&&o?{owner:r,repo:o}:null}async function qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-JUANX7G7.js");await y(d,r);return}if(o.name==="stop"){await Pe(d,r);return}if(o.name==="cancel"){await Fe(d,r);return}await Ae(d,r);return}let i=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),t=ie(l(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=l(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=l(e,"--output"),a=Number(l(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let m=600;a>m&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 exceeds the ${m}s (10m) maximum`),process.exit(1));let u=Number(l(e,"--fps")??"30"),p=l(e,"--frames");if(p!==void 0){let d=Number(p);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),process.exit(1))}let x=e.includes("--open"),j=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,g=Math.max(100,Math.round(a*1e3)),K=l(e,"--origin"),pe=re(e);if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await P("record",{originOverride:K,allowGitHubAuth:!0});let d=v({...i,commandTimeoutMs:6e4});try{await q(d),await ae(d,t),t==="combined"&&await B(d),await de(d,K,pe);let y=await ce(d,t,t==="combined"?n:void 0);y.ok||(console.error(` start failed: recording store refused to start (${t})`+(y.error?`: ${y.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${a}s`),await new Promise(_=>setTimeout(_,g)),await le(d);let O=await ue(d);me(O,x,t)}finally{d.close()}return}let C=p?Number(p):null,R=Te(s,c,C);x&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let h=v({...i,commandTimeoutMs:6e4});try{if(await te(h),await B(h),R==="png"){let $=C??10,w=U(c,`sootsim-frames-${M()}`);c&&oe(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),E(w,{recursive:!0});for(let f of he(w))/^frame-\d+\.png$/.test(f)&&J(N(w,f),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${w}`);let S=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${g}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!S.ok||!S.requestId)&&(console.error(` frame capture start failed: ${S.error??"unknown error"}`),process.exit(1)),await new Promise(f=>setTimeout(f,g));let fe=Date.now()+Math.max(5e3,g),A=null;for(;;){let f=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${S.requestId})`});if(f||(console.error(" frame capture result missing"),process.exit(1)),f.done){f.ok||(console.error(` frame capture failed: ${f.error??"unknown error"}`),process.exit(1)),A=f.frames??[];break}Date.now()>=fe&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(F=>setTimeout(F,100))}A.forEach((f,F)=>{let ge=`${w}/frame-${String(F+1).padStart(3,"0")}.png`;I(ge,Buffer.from(f.data,"base64"))}),console.log(` saved ${A.length} frames`);return}if(R==="gif"){let $=C??Math.max(10,Math.round(a*u/3)),w=U(c,`sootsim-${M()}.gif`);E(W(w),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${w}`);let S=await D(h,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${g}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",g);S||(console.error(" gif capture returned no frames"),process.exit(1)),I(w,Buffer.from(S.data,"base64")),console.log(` saved: ${w} (${G(S.size)})`);return}let d=U(c,`sootsim-${M()}.${R}`);E(W(d),{recursive:!0});let y={format:R,fps:u,durationMs:g};n&&(y.layers=n);let O=await D(h,`window.__sootsimRecorder.start(${JSON.stringify(y)})`,`${R} start`,g);O.ok||(console.error(` start failed: ${O.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(O.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${R} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,g));let _=await D(h,"window.__sootsimRecorder.stop()",`${R} encode/flush`,g);_.ok||(console.error(` stop failed: ${_.error??"unknown error"}`),process.exit(1)),_.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await ne(h,d),console.log(` saved: ${d} (${G(_.size)})`)}finally{h.close()}}var Ee=6e3;async function L(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function te(e){await L(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function B(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
|
|
8
8
|
would be throttled to ~1fps and produce a frozen-looking file.
|
|
9
9
|
bring the chrome window to the foreground (un-minimize / switch to
|
|
10
10
|
its tab) or run the recording in headless playwright, then retry.`),process.exit(1))}async function ne(e,r){let o=[],i=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),i=t.offset,t.done)break}I(r,Buffer.concat(o))}function l(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Be(e){if(!e)return;let r=oe(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Te(e,r,o){return e||(o!=null?"png":Be(r)??"webm")}function M(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function Me(){let e=N(ve(),".sootsim","recordings");return E(e,{recursive:!0}),e}function U(e,r){return e?Se(process.cwd(),e):N(Me(),r)}function G(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function ie(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function H(){return N(ye(),`sootsim-recording-${X()}.json`)}function T(){let e=H();if(!we(e))return null;try{return{mode:"video",...JSON.parse(be(e,"utf8"))}}catch{return J(e,{force:!0}),null}}function Ue(e){I(H(),JSON.stringify(e,null,2))}function k(){J(H(),{force:!0})}function V(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-H6CPDHFG.js";import"./chunk-LCX3R5GU.js";import"./chunk-HSC4YJX7.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-HU4ZXOLS.js";export{a as runRuntime};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as me,b as he,e as ge}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as me,b as he,e as ge}from"./chunk-ZXTNCFPG.js";import{b as de}from"./chunk-IXLWH3XE.js";import{a as pe}from"./chunk-454SCBS7.js";import"./chunk-YZD3FUOU.js";import"./chunk-NQCAVMZZ.js";import{a as j,b as fe}from"./chunk-NBT3VVSY.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import{r as ae}from"./chunk-RM4Q4CME.js";import{g as _,h as ce,i as U,j as le,k as ue,l as F,m as M}from"./chunk-HSC4YJX7.js";import"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import{a as v,b as V,c as K,d as X,e as J,f as z,g as I}from"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";import{mkdirSync as be,writeFileSync as we}from"fs";import{dirname as Se,resolve as xe}from"path";async function ke(e,t){let o=st(e);(o.includes("--help")||o.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{b as ce,c as H,d as le,e as F,f as de,h as ue,i as C,j as pe,k as me,l as he,p as fe,s as v,t as ge,u as Se,v as ye,w as ve}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as ce,c as H,d as le,e as F,f as de,h as ue,i as C,j as pe,k as me,l as he,p as fe,s as v,t as ge,u as Se,v as ye,w as ve}from"./chunk-FFR4USO5.js";import"./chunk-4YYFY5HM.js";import{a as ae}from"./chunk-NQCAVMZZ.js";import"./chunk-NBT3VVSY.js";import{g as oe}from"./chunk-LCX3R5GU.js";import{f as P,g as ne}from"./chunk-I7YBEJW2.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-HSC4YJX7.js";import{d as se}from"./chunk-JOFQ67LV.js";import{a as Q,b as ee}from"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import{a as ie,b as re}from"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import{C as E,D as J,E as K,F as D,H as V,I as G,K as q,M as z,N as X,O as Y,P as U,Q as Z,y as M,z as j}from"./chunk-QWZBLVT4.js";import{a as te}from"./chunk-EZCGWPX4.js";import"./chunk-HU4ZXOLS.js";import{spawn as dt}from"child_process";import I from"fs";import{createServer as ut}from"http";import S from"path";import{WebSocket as h,WebSocketServer as pt}from"ws";import ke from"node:fs";import _ from"node:path";import{spawn as Ne}from"node:child_process";import Me from"node:fs";import De from"node:os";import Ue from"node:path";var be=/^[A-Za-z0-9._:-]{1,160}$/;function W(o){if(!o?.startsWith("AGENTBUS_SESSION:"))return null;let e=o.slice(17).trim();return be.test(e)?e:null}function we(o){return be.test(o)}function He(o){return typeof o.text=="string"?o.text.trim():""}function Fe(o){let e=o?.trim();if(e)return e;let t=process.env.AGENTBUS_COMMAND?.trim();if(t)return t;let i=Ue.join(De.homedir(),".local","bin","agentbus");return Me.existsSync(i)?i:"agentbus"}async function Ae(o){let e=o.sessionId.trim();if(!we(e))throw new Error(`invalid agentbus session id: ${e||"<empty>"}`);let t=He(o.prompt);if(!t)throw new Error("prompt text is empty");let i=Fe(o.command),s=o.timeoutMs??15e3;await new Promise((n,a)=>{let r=Ne(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),c="",d=setTimeout(()=>{try{r.kill("SIGTERM")}catch{}a(new Error(`agentbus send timed out after ${Math.round(s/1e3)}s`))},s);r.stderr?.setEncoding("utf8"),r.stderr?.on("data",l=>{c.length<4e3&&(c+=String(l))}),r.on("error",l=>{clearTimeout(d),a(l)}),r.on("exit",(l,u)=>{if(clearTimeout(d),l===0){n();return}let p=c.trim();a(new Error(p||`agentbus send exited with ${u?`signal ${u}`:`code ${l??"unknown"}`}`))})})}var R=1;function We(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var 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 v?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await he()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
|
|
3
3
|
`)}}close(){for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return F();case"agent:upsert-project":return H(i.input??{});case"agent:delete-project":return ue(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return pe(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-claimed-prompt":return this.sendClaimedPrompt(i);case"agent:send-prompt":{let n=String(i.sessionId),a=C(n);if(!a)throw new v("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await Se(n,r),this.notePromptAccepted(n,r,a.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await ye(String(i.sessionId));let s=C(String(i.sessionId));return s&&this.broadcastSessionStatus(s),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new v("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async sendClaimedPrompt(e){let t=typeof e.simId=="string"?e.simId.trim():"";if(!t)throw new v("NO_SIM","agent:send-claimed-prompt requires simId");let i=this.opts.resolveCliLease?.(t)??null;if(!i||i.kind!=="cli"||i.expiresAt<=Date.now())throw new v("NO_CLAIM",`sim ${t} has no active CLI claim`);let s=W(i.cliIdentityKey);if(!s)throw new v("UNSUPPORTED_CLAIM",`sim ${t} is claimed by a CLI identity that is not promptable`);return await Ae({sessionId:s,prompt:this.normalizePromptEnvelope(e)}),{ok:!0,routed:"agentbus",sessionId:s}}async doStartSession(e){if(!le(e.projectId))throw new v("NO_PROJECT",`no project: ${e.projectId}`);let i=await ge(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?.()??We(),a=(await P({excludePorts:s})).find(l=>String(l.port)===i);if(!a||!a.cwd)return{project:null};let r=F().find(l=>l.cwd===a.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],a.bundleUrl,t]));return{project:H({cwd:a.cwd,name:a.projectName??_.basename(a.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[a.cwd],knownBundleUrls:c,framework:r?.framework??$e(a.framework),bundleId:a.bundleId??r?.bundleId})}}getTranscript(e){let t=fe(e);return ke.existsSync(t)?ke.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=ce();return{userDataDir:e,storeFile:_.join(e,"attached-projects.json"),sessionsDir:_.join(e,"sessions"),transcriptsDir:_.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let s=this.subscriptions.get(t);if(s)return s.refCount++,{ok:!0,refCount:s.refCount};let n=ve(t,a=>{let r=this.coalescePromptEcho(t,a);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),a.type==="turn-completed"){let c=C(t);if(c)try{de(c.projectId,{usd:a.costUsd,ts:a.ts})}catch(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 a=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,a);let r=t.displayText??t.text;return this.patchSession(e,{lastPrompt:r,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:r,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:s}),{ok:!0,queued:a>1,pendingTurns:a,queueDepth:Math.max(0,a-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){me(e,t);let i=C(e);i&&this.broadcastSessionStatus(i)}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[s,n]of this.sessionsBySocket)if(n.has(e)&&s.readyState===R)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===R)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===R)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===R)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function $e(o){return o==="expo"?"expo":o==="one"||o==="vxrn"?"one":"unknown"}import Ke from"http";import Ve from"https";var $="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",je=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"},suppressBrowserUserAgent:!0}];function Je(o){let e=o.toLowerCase();for(let t of je)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t}function Ie(o){let e=Je(o.hostname);return{"accept-encoding":"identity",...e?.suppressBrowserUserAgent?{}:{"user-agent":$},...e?.headers}}var Ge=new Set(["host","origin","referer","user-agent","accept-encoding","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),qe={"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"},ze=new Set(["host","origin","referer","sec-fetch-site","sec-fetch-mode","sec-fetch-dest"]);function T(o){for(let[e,t]of Object.entries(qe))o.setHeader(e,t)}function Xe(o,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return o.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function Ye(o){let t=(Array.isArray(o)?o[0]:o)?.split(";",1)[0]?.trim().toLowerCase();return t?t.startsWith("text/")||t==="application/json"||t.endsWith("+json")||t==="application/x-www-form-urlencoded"||t==="application/xml"||t.endsWith("+xml")||t==="application/javascript"||t==="application/graphql":!1}function Ze(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(Ge.has(i.toLowerCase())||(t[i]=Array.isArray(s)?s.join(", "):s));return Object.assign(t,e?Ie(e):{"user-agent":$}),t}function Qe(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(ze.has(i.toLowerCase())||(t[i]=s));return t.host=e.host,t.origin=e.origin,t.referer=`${e.origin}/`,t}function Ce(o){return o?.startsWith("/__fetch-proxy?")||o?.startsWith("/__proxy?")||!1}function Te(o){return o?!!(o.startsWith("/__app-api?")||o.startsWith("/__app-api/")):!1}async function Ee(o,e){if(o.method==="OPTIONS"){T(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n=Ze(o.headers,s),a;if(o.method!=="GET"&&o.method!=="HEAD"){let l=[];for await(let u of o)l.push(Buffer.isBuffer(u)?u:Buffer.from(u));if(l.length>0){let u=Buffer.concat(l);a=Ye(o.headers["content-type"])?u.toString("utf8"):u}}let r;try{r=await fetch(s.href,{method:o.method,headers:n,body:a,redirect:"follow"})}catch(l){T(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${Xe(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)}),T(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(o,e){let t=o.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(o.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,s)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let a=n.protocol==="https:"?Ve:Ke,r=Qe(o.headers,n),c=a.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:o.method,headers:r},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":o.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}`)}),o.pipe(c),!0}import{WebSocket as k,WebSocketServer as et}from"ws";var tt="/__websocket-proxy",it=new Set(["host","connection","upgrade","transfer-encoding","content-length","sec-websocket-accept","sec-websocket-extensions","sec-websocket-key","sec-websocket-protocol","sec-websocket-version"]);function A(o,e,t){try{o.write(`HTTP/1.1 ${e} ${t}\r
|
|
5
5
|
Connection: close\r
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g,b as k}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g,b as k}from"./chunk-CGC6VL3E.js";import{b as S,c as x}from"./chunk-63GQM7YC.js";import{a as w}from"./chunk-P5VG36UG.js";import"./chunk-V4U35I2X.js";import"./chunk-SIQUJOVP.js";import"./chunk-CQPAW4BG.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import{D as v,I as f,K as m,l as b}from"./chunk-QWZBLVT4.js";import"./chunk-EZCGWPX4.js";import"./chunk-K5IZM7I5.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";import{existsSync as r,mkdirSync as j,readFileSync as d,readdirSync as I,writeFileSync as D}from"fs";import{basename as p,dirname as y,join as i,relative as c,resolve as h}from"path";var T=["bun","pnpm","npm"];async function pe(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim setup \u2014 set up this machine for SootSim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -94,4 +94,4 @@ module.exports = {
|
|
|
94
94
|
4. inspect and drive it:
|
|
95
95
|
sootsim describe
|
|
96
96
|
sootsim do tap-text "Sign in"
|
|
97
|
-
`)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-
|
|
97
|
+
`)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-IC2NOIT3.js");await o([],{port:7668})}async function R(n,e,o){return o.yes?!0:process.stdin.isTTY?g(n,e):(console.log(` ${n} ${e?"[Y/n]":"[y/N]"} n (non-interactive; pass --yes to accept)`),!1)}export{J as detectConfigScaffoldExt,M as detectNodeVersionPins,W as detectPreferredPackageManager,E as readMachineSetupStatus,pe as runSetup,de as shouldRunSetupForBareCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-HU4ZXOLS.js";import*as i from"fs";import*as I from"os";import*as a from"path";import{fileURLToPath as h}from"url";function $(){try{let t=h(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(h(import.meta.url));return a.resolve(t,"../../skills")}}var d=$(),w=new Set(["all","codex","claude"]);function S(){console.log(`sootsim skill
|
|
3
3
|
|
|
4
4
|
install and inspect bundled SootSim agent skills.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{k as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.194 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{k as f}from"./chunk-IXLWH3XE.js";import"./chunk-454SCBS7.js";import"./chunk-6RARYOEL.js";import"./chunk-I7YBEJW2.js";import"./chunk-DJSMPGAY.js";import"./chunk-Z2VLPNTW.js";import"./chunk-EKLBXHUK.js";import"./chunk-JPWVEJEC.js";import"./chunk-DZCTXHGC.js";import"./chunk-RM4Q4CME.js";import"./chunk-HSC4YJX7.js";import{a as t,b as n,c as l,d as c,e as a}from"./chunk-PIK54AHY.js";import"./chunk-LDWXDKXP.js";import"./chunk-JOFQ67LV.js";import"./chunk-TC34NFOE.js";import"./chunk-NZCCIUPD.js";import"./chunk-ZKV5SZCW.js";import"./chunk-5WHIIC72.js";import"./chunk-YFT6QNH3.js";import"./chunk-7CNBR64U.js";import"./chunk-QWZBLVT4.js";import"./chunk-IKNJYCUF.js";import"./chunk-HU4ZXOLS.js";function p(){console.log(`
|
|
3
3
|
sootsim storage profile \u2014 manage isolated storage profiles
|
|
4
4
|
|
|
5
5
|
usage:
|