sootsim 0.1.195 → 0.1.196

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.
Files changed (135) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-2SXLGZU5.js → agent-7VV2YS5K.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-Z4T2JLIQ.js → agent-wrapper-HEZELILJ.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-57M3WMLT.js → app-fonts-CTFO7N3A.js} +2 -2
  5. package/dist-cli/chunks/{assert-ZDSDYXM7.js → assert-QCFTPXWT.js} +2 -2
  6. package/dist-cli/chunks/{auth-GCFU3FPN.js → auth-5PL2DUSY.js} +2 -2
  7. package/dist-cli/chunks/beta-56TUG33G.js +2 -0
  8. package/dist-cli/chunks/{camera-2Q6EQ755.js → camera-CDODMF26.js} +2 -2
  9. package/dist-cli/chunks/{chunk-6OI4P6BP.js → chunk-3VDYVNXU.js} +2 -2
  10. package/dist-cli/chunks/{chunk-G4HILTME.js → chunk-4DBQ7YGH.js} +2 -2
  11. package/dist-cli/chunks/{chunk-7WC5DXPG.js → chunk-4FPIEYJQ.js} +2 -2
  12. package/dist-cli/chunks/{chunk-NOW2AR67.js → chunk-64S5TQC3.js} +2 -2
  13. package/dist-cli/chunks/{chunk-O3V7G75W.js → chunk-6B5ZSUG4.js} +1 -1
  14. package/dist-cli/chunks/{chunk-VBOZBE6C.js → chunk-6S6Z5BWE.js} +2 -2
  15. package/dist-cli/chunks/{chunk-PEGAQ2RB.js → chunk-7DESH3Y6.js} +2 -2
  16. package/dist-cli/chunks/{chunk-RZNXUNAQ.js → chunk-BUWXWDBA.js} +2 -2
  17. package/dist-cli/chunks/{chunk-RZDJVRQK.js → chunk-DBFIJJQS.js} +1 -1
  18. package/dist-cli/chunks/{chunk-YBXS3LTW.js → chunk-DKELBKSC.js} +1 -1
  19. package/dist-cli/chunks/{chunk-3GQAHK2F.js → chunk-DNXN75YR.js} +1 -1
  20. package/dist-cli/chunks/{chunk-GIR3RNE5.js → chunk-DSK5O7XJ.js} +1 -1
  21. package/dist-cli/chunks/{chunk-TK26HLN4.js → chunk-FCQEJWWZ.js} +1 -1
  22. package/dist-cli/chunks/{chunk-6S62XK5C.js → chunk-FL2VXRHB.js} +3 -3
  23. package/dist-cli/chunks/{chunk-BWGZZ7OI.js → chunk-GRWR6D2G.js} +2 -2
  24. package/dist-cli/chunks/{chunk-URIOQ3LY.js → chunk-GRZH3TNX.js} +2 -2
  25. package/dist-cli/chunks/{chunk-3DLZ4FJI.js → chunk-HDENRNBX.js} +2 -2
  26. package/dist-cli/chunks/chunk-I4LN4LGH.js +1 -0
  27. package/dist-cli/chunks/{chunk-7C7XLYIL.js → chunk-IKUTXUNH.js} +1 -1
  28. package/dist-cli/chunks/{chunk-ASTS6QOH.js → chunk-JVNX623C.js} +3 -3
  29. package/dist-cli/chunks/{chunk-MRJ3JET4.js → chunk-KPYISBO7.js} +1 -1
  30. package/dist-cli/chunks/{chunk-IDLAKJER.js → chunk-L2PR5XCL.js} +1 -1
  31. package/dist-cli/chunks/{chunk-6ILXMJDK.js → chunk-LDQF2IQA.js} +2 -2
  32. package/dist-cli/chunks/{chunk-YBUKWQUZ.js → chunk-LEQWAE5B.js} +1 -1
  33. package/dist-cli/chunks/{chunk-UQWWFIQV.js → chunk-MI473PXL.js} +1 -1
  34. package/dist-cli/chunks/{chunk-2JCCEHF7.js → chunk-MLP4W2JW.js} +2 -2
  35. package/dist-cli/chunks/{chunk-4BQRULZH.js → chunk-O44TU6LO.js} +2 -2
  36. package/dist-cli/chunks/{chunk-FLSYVUEL.js → chunk-OA6H52UT.js} +2 -2
  37. package/dist-cli/chunks/{chunk-PWAK5OIK.js → chunk-OZTROCAR.js} +2 -2
  38. package/dist-cli/chunks/{chunk-45AKDBKD.js → chunk-P4AAS73X.js} +2 -2
  39. package/dist-cli/chunks/{chunk-Z6KDOLRX.js → chunk-RTWIWFA6.js} +1 -1
  40. package/dist-cli/chunks/{chunk-O6X4PUVA.js → chunk-SFRIHAPF.js} +1 -1
  41. package/dist-cli/chunks/{chunk-QK3UIAL2.js → chunk-SOUGUL4Y.js} +1 -1
  42. package/dist-cli/chunks/{chunk-ZL42H3QC.js → chunk-SZ6GB3RE.js} +3 -3
  43. package/dist-cli/chunks/{chunk-DOL4V4TD.js → chunk-T7YVS2SC.js} +3 -3
  44. package/dist-cli/chunks/{chunk-VAOV6LVA.js → chunk-U5K2QCYY.js} +1 -1
  45. package/dist-cli/chunks/{chunk-L5M7ZXRO.js → chunk-VP5STTLY.js} +2 -2
  46. package/dist-cli/chunks/chunk-WEWPXSFB.js +1 -0
  47. package/dist-cli/chunks/{chunk-3NHEXDE7.js → chunk-WZNDVTK5.js} +1 -1
  48. package/dist-cli/chunks/{chunk-VIIC2RBU.js → chunk-XW6N7M6O.js} +2 -2
  49. package/dist-cli/chunks/{chunk-W6EAK5V4.js → chunk-ZPSX53VU.js} +2 -2
  50. package/dist-cli/chunks/cli-version-GSRVHYD2.js +2 -0
  51. package/dist-cli/chunks/{compat-PEEDQENJ.js → compat-7DNTENZC.js} +3 -3
  52. package/dist-cli/chunks/{config-JWIRARHW.js → config-OKXVJMWL.js} +2 -2
  53. package/dist-cli/chunks/{control-XMVJJY74.js → control-ZK62SB6E.js} +2 -2
  54. package/dist-cli/chunks/daemon-L3GLGV2C.js +2 -0
  55. package/dist-cli/chunks/{debug-QF2FBVFJ.js → debug-DSN6URLQ.js} +3 -3
  56. package/dist-cli/chunks/{desktop-36PJJOCB.js → desktop-H6V3QBVQ.js} +3 -3
  57. package/dist-cli/chunks/{detox-JM4GGPPI.js → detox-NQKPGIDN.js} +2 -2
  58. package/dist-cli/chunks/{device-P7T54KCN.js → device-LWGRBUSC.js} +2 -2
  59. package/dist-cli/chunks/{diagnose-HANGNVID.js → diagnose-C2WITABK.js} +2 -2
  60. package/dist-cli/chunks/drivers-E5YNBAEJ.js +2 -0
  61. package/dist-cli/chunks/flow-EB2IAY7O.js +2 -0
  62. package/dist-cli/chunks/help-LGJMWZ3D.js +2 -0
  63. package/dist-cli/chunks/{home-paths-AY5QCPZF.js → home-paths-K225NTYF.js} +2 -2
  64. package/dist-cli/chunks/inspect-KM2FF6CB.js +2 -0
  65. package/dist-cli/chunks/install-desktop-2BC7NTGT.js +2 -0
  66. package/dist-cli/chunks/{login-D5PAGSQD.js → login-COKO7POR.js} +4 -4
  67. package/dist-cli/chunks/{logout-2XUENTSF.js → logout-5S2FPEMI.js} +2 -2
  68. package/dist-cli/chunks/{maestro-I3BADRUJ.js → maestro-PEOFOZLJ.js} +2 -2
  69. package/dist-cli/chunks/{mode-2AFNVIGA.js → mode-OSOIV7X5.js} +2 -2
  70. package/dist-cli/chunks/optional-demo-registry-N7PJSAG7.js +2 -0
  71. package/dist-cli/chunks/{perf-QMAJYMCS.js → perf-E6E46PSB.js} +2 -2
  72. package/dist-cli/chunks/{record-CCEP74H3.js → record-WGT4NYDD.js} +3 -3
  73. package/dist-cli/chunks/runtime-VP2R27QI.js +2 -0
  74. package/dist-cli/chunks/{screenshot-command-BPU63ULB.js → screenshot-command-IVWNLSH7.js} +2 -2
  75. package/dist-cli/chunks/{serve-MP76K2DW.js → serve-WYMZH2OM.js} +2 -2
  76. package/dist-cli/chunks/{setup-ULDPNTVP.js → setup-7NINUVSO.js} +3 -3
  77. package/dist-cli/chunks/{skills-AXDG2VZT.js → skills-VSG2L2D5.js} +2 -2
  78. package/dist-cli/chunks/{storage-RFJVSCSD.js → storage-YTGOWC6P.js} +2 -2
  79. package/dist-cli/chunks/store-YSH3Y7TU.js +2 -0
  80. package/dist-cli/chunks/telemetry-HSELJJF7.js +2 -0
  81. package/dist-cli/chunks/{test-PF2RVRU4.js → test-BNI37OJN.js} +5 -5
  82. package/dist-cli/chunks/{timeline-PYHL57AY.js → timeline-5HATH52U.js} +2 -2
  83. package/dist-cli/chunks/{upgrade-PFPXP7I5.js → upgrade-CZ4IDZPJ.js} +2 -2
  84. package/dist-cli/chunks/upload-SCPAVRE5.js +2 -0
  85. package/dist-cli/chunks/{version-L4UPIIQX.js → version-6IFPJNN5.js} +2 -2
  86. package/dist-cli/chunks/{web-N2IRGHFP.js → web-WVJWPFIA.js} +2 -2
  87. package/dist-cli/chunks/{what-happened-IFLDGKFC.js → what-happened-J6XI43BG.js} +2 -2
  88. package/dist-lib/agent-daemon-client.cjs +1 -1
  89. package/dist-lib/agent-events.cjs +1 -1
  90. package/dist-lib/agent-identity.cjs +1 -1
  91. package/dist-lib/agent-sessions.cjs +1 -1
  92. package/dist-lib/attached-projects.cjs +1 -1
  93. package/dist-lib/auth/shared-session.cjs +1 -1
  94. package/dist-lib/backend-origin.cjs +1 -1
  95. package/dist-lib/beta.cjs +1 -1
  96. package/dist-lib/beta.mjs +1 -1
  97. package/dist-lib/bridge-constants.cjs +1 -1
  98. package/dist-lib/cli-constants.cjs +1 -1
  99. package/dist-lib/config.cjs +1 -1
  100. package/dist-lib/detox/index.cjs +1 -1
  101. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  102. package/dist-lib/home-paths.cjs +1 -1
  103. package/dist-lib/host/bridge-host.cjs +1 -1
  104. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  105. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  106. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  107. package/dist-lib/host/websocket-proxy.cjs +1 -1
  108. package/dist-lib/index.cjs +1 -1
  109. package/dist-lib/jump-to-source-babel.cjs +1 -1
  110. package/dist-lib/menu.cjs +1 -1
  111. package/dist-lib/menu.mjs +1 -1
  112. package/dist-lib/metro.cjs +1 -1
  113. package/dist-lib/profiles.cjs +1 -1
  114. package/dist-lib/render-mode.cjs +1 -1
  115. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  116. package/dist-lib/sdk.cjs +1 -1
  117. package/dist-lib/sdk.mjs +1 -1
  118. package/dist-lib/skills.cjs +1 -1
  119. package/dist-lib/vite.cjs +1 -1
  120. package/package.json +1 -1
  121. package/dist-cli/chunks/beta-CDNCKSIR.js +0 -2
  122. package/dist-cli/chunks/chunk-CUD7JMPE.js +0 -1
  123. package/dist-cli/chunks/chunk-QOX33I2E.js +0 -1
  124. package/dist-cli/chunks/cli-version-EODTZL3G.js +0 -2
  125. package/dist-cli/chunks/daemon-XR2776R7.js +0 -2
  126. package/dist-cli/chunks/drivers-GHTDMDZW.js +0 -2
  127. package/dist-cli/chunks/flow-67W54GMT.js +0 -2
  128. package/dist-cli/chunks/help-LB25BJRD.js +0 -2
  129. package/dist-cli/chunks/inspect-J6NIQIMB.js +0 -2
  130. package/dist-cli/chunks/install-desktop-KHSH4TYV.js +0 -2
  131. package/dist-cli/chunks/optional-demo-registry-NAGQDKQZ.js +0 -2
  132. package/dist-cli/chunks/runtime-XCOCSQKQ.js +0 -2
  133. package/dist-cli/chunks/store-H7XRYXSL.js +0 -2
  134. package/dist-cli/chunks/telemetry-T2H7BPRZ.js +0 -2
  135. package/dist-cli/chunks/upload-7IDVWZ4C.js +0 -2
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
3
3
  `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
4
4
  run: bun run --cwd packages/sootsim-engine build:electron-main
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{D as t,J as n,L as l,j as r}from"./chunk-YBXS3LTW.js";function m(){let e=t(),i=r()?n():null;return i&&l(i)?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{m as a};
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{D as t,J as n,L as l,j as r}from"./chunk-DKELBKSC.js";function m(){let e=t(),i=r()?n():null;return i&&l(i)?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{m as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as m,b as I}from"./chunk-3NHEXDE7.js";import{a as w,b as _,c as T}from"./chunk-TK26HLN4.js";import{c as O}from"./chunk-VAOV6LVA.js";import{C as k,o as D,q as f}from"./chunk-YBXS3LTW.js";import h from"fs";import v from"path";var c="default",F="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),F)}function G(e){return`sootsim-profile-${s(e)}`}function H(e){return v.join(D(),"Partitions",G(e))}function y(e){return v.join(f(),"playwright",s(e))}function b(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function A(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:A(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:A([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){k();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as m,b as I}from"./chunk-WZNDVTK5.js";import{a as w,b as _,c as T}from"./chunk-FCQEJWWZ.js";import{c as O}from"./chunk-U5K2QCYY.js";import{C as k,o as D,q as f}from"./chunk-DKELBKSC.js";import h from"fs";import v from"path";var c="default",F="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),F)}function G(e){return`sootsim-profile-${s(e)}`}function H(e){return v.join(D(),"Partitions",G(e))}function y(e){return v.join(f(),"playwright",s(e))}function b(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function A(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:A(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:A([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){k();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
3
3
  `,"utf8"),h.renameSync(t,g()),r}function q(){return S(b()).profiles}function z(e){let r=s(e);return q().find(t=>t.id===r)??null}function E(e=c){let r=s(e),t=z(r);return t||B(r)}function B(e){let r=s(e),t=P(b());if(t.profiles.some(n=>n.id===r))throw new Error(`profile already exists: ${r}`);let o=new Date().toISOString(),i={id:r,createdAt:o,updatedAt:o};return S({version:a,profiles:[...t.profiles,i]}),i}function pe(e){let r=s(e);if(r===c)throw new Error("the default profile cannot be deleted; clear it instead");let t=P(b()),o=t.profiles.find(i=>i.id===r);if(!o)throw new Error(`profile not found: ${r}`);return S({version:a,profiles:t.profiles.filter(i=>i.id!==r)}),j(r),o}function j(e){let r=s(e);for(let t of[H(r),y(r)])try{h.rmSync(t,{recursive:!0,force:!0})}catch{}}function Y(){let e=w();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function K(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=w();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await T(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var M={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:Y,launch:K};function V(){let e=m();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim desktop install`)"}}async function J(e){let r=m();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await I(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var C={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:V,launch:J};import{spawn as X}from"child_process";import{closeSync as Z,mkdtempSync as Q,openSync as ee,readFileSync as re}from"fs";import{createRequire as te}from"module";import{tmpdir as L}from"os";import{join as W}from"path";var oe=`
4
4
  const modulePath = process.env.SOOTSIM_PW_MODULE;
5
5
  const url = process.env.SOOTSIM_PW_URL;
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-SOUGUL4Y.js";import"./chunk-DSK5O7XJ.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-DSK5O7XJ.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-N2IRGHFP.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-N2IRGHFP.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(`
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-WVJWPFIA.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-WVJWPFIA.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as i,B as s,x as t}from"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as i,B as s,x as t}from"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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.195 | (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-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import"./chunk-7WC5DXPG.js";import"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-FLSYVUEL.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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};
1
+ /*! sootsim v0.1.196 | (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-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-3VDYVNXU.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-64S5TQC3.js";import"./chunk-XW6N7M6O.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-SOUGUL4Y.js";import"./chunk-IKUTXUNH.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-RZNXUNAQ.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-O3V7G75W.js";import{g as D,i as O,k as x}from"./chunk-7WC5DXPG.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-BUWXWDBA.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-6B5ZSUG4.js";import{g as D,i as O,k as x}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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-J6NIQIMB.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,...]>
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-KM2FF6CB.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-ZL42H3QC.js";import{a as v,h as k}from"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import{a as u}from"./chunk-UQWWFIQV.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import"./chunk-7WC5DXPG.js";import"./chunk-CUD7JMPE.js";import{b as m,g as f,l as h}from"./chunk-W6EAK5V4.js";import{a as c}from"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-FLSYVUEL.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-SZ6GB3RE.js";import{a as v,h as k}from"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import{a as u}from"./chunk-MI473PXL.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-I4LN4LGH.js";import{b as m,g as f,l as h}from"./chunk-ZPSX53VU.js";import{a as c}from"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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-KHSH4TYV.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(`
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-2BC7NTGT.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as S}from"./chunk-6S62XK5C.js";import"./chunk-DOL4V4TD.js";import"./chunk-6ILXMJDK.js";import"./chunk-45AKDBKD.js";import"./chunk-PWAK5OIK.js";import"./chunk-3DLZ4FJI.js";import"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import"./chunk-7WC5DXPG.js";import"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-O6X4PUVA.js";import"./chunk-FLSYVUEL.js";import"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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=`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as S}from"./chunk-FL2VXRHB.js";import"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-QOX33I2E.js";import{g as d,i as l,l as a}from"./chunk-7WC5DXPG.js";import"./chunk-FLSYVUEL.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import{g as c,h as r,i as g}from"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.js";function h(){console.log(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-WEWPXSFB.js";import{g as d,i as l,l as a}from"./chunk-4FPIEYJQ.js";import"./chunk-OA6H52UT.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import{g as c,h as r,i as g}from"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as E,i as R,l as b}from"./chunk-7WC5DXPG.js";import"./chunk-RZDJVRQK.js";import{b as v}from"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as E,i as R,l as b}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import{b as v}from"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-I4LN4LGH.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-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c,d,e,f,g}from"./chunk-FL2VXRHB.js";import{c as a,d as b}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-64S5TQC3.js";import"./chunk-XW6N7M6O.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-SOUGUL4Y.js";import"./chunk-IKUTXUNH.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.195 | (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-YBXS3LTW.js";import"./chunk-GIR3RNE5.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};
1
+ /*! sootsim v0.1.196 | (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-DKELBKSC.js";import"./chunk-DSK5O7XJ.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{j as a,k as b}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-SZ6GB3RE.js";import"./chunk-MI473PXL.js";import"./chunk-WZNDVTK5.js";import"./chunk-DSK5O7XJ.js";export{a as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as g,d as m}from"./chunk-L5M7ZXRO.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as g,d as m}from"./chunk-VP5STTLY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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-T2H7BPRZ.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:
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-HSELJJF7.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-T2H7BPRZ.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-T2H7BPRZ.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};
26
+ `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-HSELJJF7.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-HSELJJF7.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-4BQRULZH.js";import{a as t,c as o}from"./chunk-L5M7ZXRO.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.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
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-O44TU6LO.js";import{a as t,c as o}from"./chunk-VP5STTLY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{e as w,f as v}from"./chunk-6S62XK5C.js";import{c as y}from"./chunk-DOL4V4TD.js";import{a as h}from"./chunk-6ILXMJDK.js";import"./chunk-45AKDBKD.js";import"./chunk-PWAK5OIK.js";import"./chunk-3DLZ4FJI.js";import"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import"./chunk-7WC5DXPG.js";import"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-O6X4PUVA.js";import"./chunk-FLSYVUEL.js";import"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{e as w,f as v}from"./chunk-FL2VXRHB.js";import{c as y}from"./chunk-T7YVS2SC.js";import{a as h}from"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u,i as g,l as T,m as N}from"./chunk-7WC5DXPG.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.js";function D(e){let o=e[0]?.toLowerCase()??"toggle";return o!=="on"&&o!=="off"&&o!=="toggle"&&(console.error(` unknown argument: "${o}" (expected on | off | toggle)`),process.exit(1)),o}async function h(e,o,n){let r=u(e,{port:o.port}),d=D(r.positional),c=g({...r,commandTimeoutMs:5e3});try{let i=!!(await T(c,"SootSim.bridges.settings.get"))?.[n.modeKey],a=d==="on"?!0:d==="off"?!1:!i;if(i===a)return console.log(` ${n.displayName}: already ${a?"on":"off"}`),{current:i,target:a,changed:!1};if(!await c.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u,i as g,l as T,m as N}from"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";function D(e){let o=e[0]?.toLowerCase()??"toggle";return o!=="on"&&o!=="off"&&o!=="toggle"&&(console.error(` unknown argument: "${o}" (expected on | off | toggle)`),process.exit(1)),o}async function h(e,o,n){let r=u(e,{port:o.port}),d=D(r.positional),c=g({...r,commandTimeoutMs:5e3});try{let i=!!(await T(c,"SootSim.bridges.settings.get"))?.[n.modeKey],a=d==="on"?!0:d==="off"?!1:!i;if(i===a)return console.log(` ${n.displayName}: already ${a?"on":"off"}`),{current:i,target:a,changed:!1};if(!await c.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(n.modeKey)}
4
4
  const target = ${JSON.stringify(a)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-DNXN75YR.js";import"./chunk-DSK5O7XJ.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{k as x}from"./chunk-DOL4V4TD.js";import"./chunk-6ILXMJDK.js";import"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import{g as R,i as N,l as d,m as S}from"./chunk-7WC5DXPG.js";import"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-O6X4PUVA.js";import"./chunk-FLSYVUEL.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{k as x}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import{g as R,i as N,l as d,m as S}from"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P}from"./chunk-45AKDBKD.js";import"./chunk-PWAK5OIK.js";import{a as Z,c as ee}from"./chunk-3DLZ4FJI.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import{g as b,i as v,j as Q}from"./chunk-7WC5DXPG.js";import{d as Y}from"./chunk-TK26HLN4.js";import"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import"./chunk-RZDJVRQK.js";import{b as X}from"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-GIR3RNE5.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.
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P}from"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import{a as Z,c as ee}from"./chunk-HDENRNBX.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import{g as b,i as v,j as Q}from"./chunk-4FPIEYJQ.js";import{d as Y}from"./chunk-FCQEJWWZ.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-DBFIJJQS.js";import{b as X}from"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.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-7IDVWZ4C.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
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-SCPAVRE5.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.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-JVNX623C.js";import"./chunk-MLP4W2JW.js";import"./chunk-4FPIEYJQ.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";export{a as runRuntime};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as me,b as he,e as ge}from"./chunk-6S62XK5C.js";import{b as de}from"./chunk-DOL4V4TD.js";import{a as pe}from"./chunk-6ILXMJDK.js";import"./chunk-45AKDBKD.js";import"./chunk-PWAK5OIK.js";import{a as j,b as fe}from"./chunk-3DLZ4FJI.js";import"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import{r as ae}from"./chunk-O3V7G75W.js";import{g as _,h as ce,i as U,j as le,k as ue,l as F,m as M}from"./chunk-7WC5DXPG.js";import"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-O6X4PUVA.js";import"./chunk-FLSYVUEL.js";import"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.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-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as me,b as he,e as ge}from"./chunk-FL2VXRHB.js";import{b as de}from"./chunk-T7YVS2SC.js";import{a as pe}from"./chunk-LDQF2IQA.js";import"./chunk-P4AAS73X.js";import"./chunk-OZTROCAR.js";import{a as j,b as fe}from"./chunk-HDENRNBX.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import{r as ae}from"./chunk-6B5ZSUG4.js";import{g as _,h as ce,i as U,j as le,k as ue,l as F,m as M}from"./chunk-4FPIEYJQ.js";import"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.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-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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.195 | (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-URIOQ3LY.js";import"./chunk-IDLAKJER.js";import{a as ae}from"./chunk-PWAK5OIK.js";import"./chunk-3DLZ4FJI.js";import{g as oe}from"./chunk-2JCCEHF7.js";import{f as P,g as ne}from"./chunk-G4HILTME.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-7WC5DXPG.js";import{d as se}from"./chunk-TK26HLN4.js";import{a as Q,b as ee}from"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import{a as ie,b as re}from"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.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-YBXS3LTW.js";import{a as te}from"./chunk-QK3UIAL2.js";import"./chunk-GIR3RNE5.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)}
1
+ /*! sootsim v0.1.196 | (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-GRZH3TNX.js";import"./chunk-L2PR5XCL.js";import{a as ae}from"./chunk-OZTROCAR.js";import"./chunk-HDENRNBX.js";import{g as oe}from"./chunk-MLP4W2JW.js";import{f as P,g as ne}from"./chunk-4DBQ7YGH.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-4FPIEYJQ.js";import{d as se}from"./chunk-FCQEJWWZ.js";import{a as Q,b as ee}from"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import{a as ie,b as re}from"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.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-DKELBKSC.js";import{a as te}from"./chunk-SOUGUL4Y.js";import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g,b as k}from"./chunk-UQWWFIQV.js";import{b as S,c as x}from"./chunk-6OI4P6BP.js";import{a as w}from"./chunk-4BQRULZH.js";import"./chunk-L5M7ZXRO.js";import"./chunk-NOW2AR67.js";import"./chunk-VIIC2RBU.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import{D as v,I as f,K as m,l as b}from"./chunk-YBXS3LTW.js";import"./chunk-QK3UIAL2.js";import"./chunk-7C7XLYIL.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.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(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g,b as k}from"./chunk-MI473PXL.js";import{b as S,c as x}from"./chunk-3VDYVNXU.js";import{a as w}from"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-64S5TQC3.js";import"./chunk-XW6N7M6O.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import{D as v,I as f,K as m,l as b}from"./chunk-DKELBKSC.js";import"./chunk-SOUGUL4Y.js";import"./chunk-IKUTXUNH.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.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-XMVJJY74.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};
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-ZK62SB6E.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GIR3RNE5.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
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-DSK5O7XJ.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.195 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{k as f}from"./chunk-DOL4V4TD.js";import"./chunk-6ILXMJDK.js";import"./chunk-VBOZBE6C.js";import"./chunk-G4HILTME.js";import"./chunk-QOX33I2E.js";import"./chunk-MRJ3JET4.js";import"./chunk-YBUKWQUZ.js";import"./chunk-3GQAHK2F.js";import"./chunk-RZNXUNAQ.js";import"./chunk-O3V7G75W.js";import"./chunk-7WC5DXPG.js";import{a as t,b as n,c as l,d as c,e as a}from"./chunk-W6EAK5V4.js";import"./chunk-3NHEXDE7.js";import"./chunk-TK26HLN4.js";import"./chunk-O6X4PUVA.js";import"./chunk-FLSYVUEL.js";import"./chunk-PEGAQ2RB.js";import"./chunk-BWGZZ7OI.js";import"./chunk-RZDJVRQK.js";import"./chunk-VAOV6LVA.js";import"./chunk-YBXS3LTW.js";import"./chunk-Z6KDOLRX.js";import"./chunk-GIR3RNE5.js";function p(){console.log(`
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{k as f}from"./chunk-T7YVS2SC.js";import"./chunk-LDQF2IQA.js";import"./chunk-6S6Z5BWE.js";import"./chunk-4DBQ7YGH.js";import"./chunk-WEWPXSFB.js";import"./chunk-KPYISBO7.js";import"./chunk-LEQWAE5B.js";import"./chunk-DNXN75YR.js";import"./chunk-BUWXWDBA.js";import"./chunk-6B5ZSUG4.js";import"./chunk-4FPIEYJQ.js";import{a as t,b as n,c as l,d as c,e as a}from"./chunk-ZPSX53VU.js";import"./chunk-WZNDVTK5.js";import"./chunk-FCQEJWWZ.js";import"./chunk-SFRIHAPF.js";import"./chunk-OA6H52UT.js";import"./chunk-7DESH3Y6.js";import"./chunk-GRWR6D2G.js";import"./chunk-DBFIJJQS.js";import"./chunk-U5K2QCYY.js";import"./chunk-DKELBKSC.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";function p(){console.log(`
3
3
  sootsim storage profile \u2014 manage isolated storage profiles
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-OA6H52UT.js";import"./chunk-RTWIWFA6.js";import"./chunk-DSK5O7XJ.js";export{a as settingsStore};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.196 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-O44TU6LO.js";import"./chunk-VP5STTLY.js";import"./chunk-DKELBKSC.js";import"./chunk-DSK5O7XJ.js";export{b as flushCliTelemetry,a as trackCliEvent};