sootsim 0.1.48 → 0.1.50

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 (134) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-AX2IIGGA.js → agent-K264P3HZ.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-CYIA4WBO.js → agent-wrapper-XS4C3CTX.js} +2 -2
  4. package/dist-cli/chunks/{assert-WXUMY4WQ.js → assert-BZSHUDEX.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-UI3237L3.js +2 -0
  6. package/dist-cli/chunks/beta-RZOPHEAW.js +2 -0
  7. package/dist-cli/chunks/{chunk-NODGVLX3.js → chunk-3GV2KSZR.js} +2 -2
  8. package/dist-cli/chunks/chunk-3NNIP2AU.js +2 -0
  9. package/dist-cli/chunks/{chunk-VOYMDSN6.js → chunk-54FJM6VZ.js} +1 -1
  10. package/dist-cli/chunks/{chunk-Z4X6PVCT.js → chunk-5BU4OSGL.js} +2 -2
  11. package/dist-cli/chunks/{chunk-77DLIFAS.js → chunk-5E3D5ITF.js} +2 -2
  12. package/dist-cli/chunks/{chunk-LWPLYZ6M.js → chunk-5IT4FCX4.js} +1 -1
  13. package/dist-cli/chunks/chunk-5ZNFCGBB.js +1 -0
  14. package/dist-cli/chunks/{chunk-HFYLZ5KC.js → chunk-6N3DIHG4.js} +1 -1
  15. package/dist-cli/chunks/{chunk-UAVOHNUW.js → chunk-7R2MEQJF.js} +1 -1
  16. package/dist-cli/chunks/{chunk-2V4MZ2GA.js → chunk-7VUK4YQR.js} +1 -1
  17. package/dist-cli/chunks/{chunk-JNXNANRK.js → chunk-7WL5NDA7.js} +1 -1
  18. package/dist-cli/chunks/{chunk-JT6IVW3F.js → chunk-7X5HYDMF.js} +2 -2
  19. package/dist-cli/chunks/{chunk-TZMGFGPI.js → chunk-7Z6VEDY6.js} +2 -2
  20. package/dist-cli/chunks/{chunk-YX7WHJEC.js → chunk-BRR2YUB4.js} +2 -2
  21. package/dist-cli/chunks/{chunk-5ZDXHLTR.js → chunk-BZCJZDQG.js} +3 -3
  22. package/dist-cli/chunks/{chunk-L7QWUG47.js → chunk-C3PQYWFU.js} +2 -2
  23. package/dist-cli/chunks/{chunk-NTQIMLT6.js → chunk-CCXT5QH6.js} +1 -1
  24. package/dist-cli/chunks/{chunk-Z3OFWNVG.js → chunk-CDOIENTA.js} +2 -2
  25. package/dist-cli/chunks/{chunk-JTLMW6K5.js → chunk-CY3MAPVL.js} +2 -2
  26. package/dist-cli/chunks/{chunk-FTMYUCDK.js → chunk-EIPLV35T.js} +1 -1
  27. package/dist-cli/chunks/{chunk-Z75LPOIA.js → chunk-FOD2CTAF.js} +2 -2
  28. package/dist-cli/chunks/{chunk-5TX3TMN5.js → chunk-H72JYVSH.js} +3 -3
  29. package/dist-cli/chunks/chunk-HPUM7LZG.js +1 -0
  30. package/dist-cli/chunks/{chunk-5TJ62H7F.js → chunk-HZUXWRA6.js} +2 -2
  31. package/dist-cli/chunks/{chunk-T2GQMNQU.js → chunk-L32B24J6.js} +16 -16
  32. package/dist-cli/chunks/{chunk-ITMSXL4X.js → chunk-LB33X5FX.js} +2 -2
  33. package/dist-cli/chunks/{chunk-3CNCQHRS.js → chunk-LE6TYGAB.js} +2 -2
  34. package/dist-cli/chunks/chunk-MC5ZKPVM.js +2 -0
  35. package/dist-cli/chunks/{chunk-DMW52773.js → chunk-MOQ456TZ.js} +2 -2
  36. package/dist-cli/chunks/{chunk-HDDGAW2M.js → chunk-Q223YQKG.js} +1 -1
  37. package/dist-cli/chunks/chunk-RIQ6GZZL.js +1 -0
  38. package/dist-cli/chunks/{chunk-CUDHQVA5.js → chunk-RYELNIVV.js} +1 -1
  39. package/dist-cli/chunks/{chunk-WQDITZHE.js → chunk-SZLTF3BI.js} +2 -2
  40. package/dist-cli/chunks/{chunk-AHSGYL4N.js → chunk-UWXIWNZA.js} +2 -2
  41. package/dist-cli/chunks/{chunk-ZVO4ABLX.js → chunk-V3KUGR6L.js} +1 -1
  42. package/dist-cli/chunks/{chunk-7D357J2J.js → chunk-V4WRHKMT.js} +2 -2
  43. package/dist-cli/chunks/{chunk-X46E3R6L.js → chunk-VFYDSE5J.js} +2 -2
  44. package/dist-cli/chunks/{chunk-LOLX4MOY.js → chunk-VKH25FIQ.js} +1 -1
  45. package/dist-cli/chunks/{chunk-JKDJWOSQ.js → chunk-W2MG4OA3.js} +2 -2
  46. package/dist-cli/chunks/{chunk-INIDEXC4.js → chunk-WL7OCV4P.js} +2 -2
  47. package/dist-cli/chunks/{chunk-MSCMYKPC.js → chunk-YQDXPF2Z.js} +1 -1
  48. package/dist-cli/chunks/{chunk-BLUM4WIT.js → chunk-Z4QEWLPO.js} +1 -1
  49. package/dist-cli/chunks/{chunk-KQV52OMN.js → chunk-ZHM2SOR5.js} +2 -2
  50. package/dist-cli/chunks/{chunk-HHP64ICF.js → chunk-ZPCMI5QG.js} +1 -1
  51. package/dist-cli/chunks/{compat-7Z7M6PD5.js → compat-GHXFTPVU.js} +3 -3
  52. package/dist-cli/chunks/{config-OSEZ3KWG.js → config-2CZ2X42N.js} +2 -2
  53. package/dist-cli/chunks/control-RTC726XA.js +2 -0
  54. package/dist-cli/chunks/{cpu-profile-OL2VPDCX.js → cpu-profile-AXUDQSZF.js} +2 -2
  55. package/dist-cli/chunks/{daemon-G3ON7OHZ.js → daemon-OYT4MNW5.js} +2 -2
  56. package/dist-cli/chunks/{debug-4ONAV32N.js → debug-GSPR2FNZ.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-TCS63ZRQ.js +2 -0
  58. package/dist-cli/chunks/{detox-W2RYM6BG.js → detox-PCDMPG7C.js} +2 -2
  59. package/dist-cli/chunks/{device-T4VS4T3K.js → device-HAOQGYQ5.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-ZU7OZQ2A.js → diagnose-4W66H3TN.js} +2 -2
  61. package/dist-cli/chunks/drivers-TA3LWZ5X.js +2 -0
  62. package/dist-cli/chunks/{electron-YPZABLAA.js → electron-DEZKIML3.js} +3 -3
  63. package/dist-cli/chunks/flow-KD74WWWV.js +2 -0
  64. package/dist-cli/chunks/{hints-Z3UOKTIN.js → hints-5B7UEOTA.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-UQUVRQ4U.js → home-paths-PGYAOSK4.js} +2 -2
  66. package/dist-cli/chunks/{inspect-6E4HV34I.js → inspect-QUBG2EE3.js} +3 -3
  67. package/dist-cli/chunks/install-5S3T2PJH.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-676SA6NV.js → install-desktop-F6H6MZ24.js} +3 -3
  69. package/dist-cli/chunks/{keys-ZFI5OOFG.js → keys-JDM4S4NA.js} +2 -2
  70. package/dist-cli/chunks/{launch-VNV77QV6.js → launch-A6MX4EZ6.js} +3 -3
  71. package/dist-cli/chunks/{login-DP4UYZZZ.js → login-2ZHP4WJ5.js} +4 -4
  72. package/dist-cli/chunks/{logout-QUVFZJN6.js → logout-ZXQX634G.js} +2 -2
  73. package/dist-cli/chunks/{maestro-Y26D3HN5.js → maestro-35BUDZJN.js} +2 -2
  74. package/dist-cli/chunks/{preview-JYFSFZ4J.js → preview-KGBAJEH2.js} +2 -2
  75. package/dist-cli/chunks/{profile-UEL5Q6F6.js → profile-BVWQI3HR.js} +2 -2
  76. package/dist-cli/chunks/{react-7FIMNUQ6.js → react-JROJZ3IQ.js} +2 -2
  77. package/dist-cli/chunks/{record-7FXCSWQ4.js → record-VIAGV72T.js} +2 -2
  78. package/dist-cli/chunks/runtime-V3JIGNUF.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-HKT3TDML.js → runtime-delivery-GKTXDKTG.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-ZYXLM2YB.js → screenshot-HJOUIADZ.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-CJ2G6CPK.js → screenshot-mode-CZWXUAOB.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-DFKJAKBF.js → screenshots-XRDHWLVP.js} +2 -2
  83. package/dist-cli/chunks/server-URN2JGBT.js +35 -0
  84. package/dist-cli/chunks/setup-repo-LT5NHTRW.js +2 -0
  85. package/dist-cli/chunks/{skills-PQU7B22X.js → skills-NIJL5BJB.js} +2 -2
  86. package/dist-cli/chunks/{start-VWUFFDUJ.js → start-MYAVE26X.js} +4 -4
  87. package/dist-cli/chunks/store-BNKVWXJ7.js +2 -0
  88. package/dist-cli/chunks/telemetry-VSTRFNEA.js +2 -0
  89. package/dist-cli/chunks/{test-TK7FINPS.js → test-NO4O5W4H.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-RBLRHOPV.js → three-mode-YGT4C3B3.js} +2 -2
  91. package/dist-cli/chunks/{timeline-HK3AO5R7.js → timeline-Y7524K3O.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-2LKSTHYL.js → upgrade-ZFAPXF7U.js} +2 -2
  93. package/dist-cli/chunks/upload-4OOPAZEV.js +2 -0
  94. package/dist-cli/chunks/{web-MVMHXQAE.js → web-THLK2NNP.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-LXCQCYF3.js → what-happened-3GWD7CES.js} +2 -2
  96. package/dist-cli/chunks/{whoami-QIYDODGD.js → whoami-TQW5UROJ.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +9 -3
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  107. package/dist-lib/home-paths.cjs +1 -1
  108. package/dist-lib/host/bridge-host.cjs +41 -1
  109. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/metro.cjs +1 -1
  112. package/dist-lib/profiles.cjs +1 -1
  113. package/dist-lib/render-mode.cjs +1 -1
  114. package/dist-lib/vite-base.cjs +43 -3
  115. package/dist-lib/vite.cjs +1 -1
  116. package/package.json +1 -1
  117. package/dist-cli/chunks/auto-bootstrap-SHBSE54I.js +0 -2
  118. package/dist-cli/chunks/beta-HUTLG7S5.js +0 -2
  119. package/dist-cli/chunks/chunk-2QAH2UO3.js +0 -2
  120. package/dist-cli/chunks/chunk-EFKEXVQX.js +0 -1
  121. package/dist-cli/chunks/chunk-G7F6XU5L.js +0 -1
  122. package/dist-cli/chunks/chunk-LIXV3IFT.js +0 -1
  123. package/dist-cli/chunks/chunk-NXSQ5PG3.js +0 -1
  124. package/dist-cli/chunks/control-BKBHXPZP.js +0 -2
  125. package/dist-cli/chunks/demo-app-registry-RZ3S32T3.js +0 -2
  126. package/dist-cli/chunks/drivers-BM23IJSX.js +0 -2
  127. package/dist-cli/chunks/flow-6P474SWM.js +0 -2
  128. package/dist-cli/chunks/install-55S5HGKP.js +0 -2
  129. package/dist-cli/chunks/runtime-CNLDNL2W.js +0 -2
  130. package/dist-cli/chunks/server-7IKLGAS3.js +0 -35
  131. package/dist-cli/chunks/setup-repo-HMDFTMDA.js +0 -2
  132. package/dist-cli/chunks/store-KZH4YGAS.js +0 -2
  133. package/dist-cli/chunks/telemetry-PBJ7ERBC.js +0 -2
  134. package/dist-cli/chunks/upload-LDVG27PU.js +0 -2
package/dist-cli/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
- import{a as E}from"./chunks/chunk-FTMYUCDK.js";import{a as l}from"./chunks/chunk-JTLMW6K5.js";import{a as A,b as k,c as S,d as C,e as u,f as T}from"./chunks/chunk-BLUM4WIT.js";import{a as p}from"./chunks/chunk-2QAH2UO3.js";import{a as v,d as _}from"./chunks/chunk-MSCMYKPC.js";import"./chunks/chunk-VOYMDSN6.js";import"./chunks/chunk-G7F6XU5L.js";import{z as L}from"./chunks/chunk-UAVOHNUW.js";import"./chunks/chunk-HFYLZ5KC.js";function R(){let t=L();return`sootsim CLI v${E()} \xB7 runtime ${t?`v${t}`:"not installed"}`}function g(){let t=k({bridgePort:7668,defaultShellUrl:p},l()),e=`
2
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
+ import{a as E}from"./chunks/chunk-EIPLV35T.js";import{a as l}from"./chunks/chunk-CY3MAPVL.js";import{a as A,b as k,c as S,d as C,e as u,f as T}from"./chunks/chunk-Z4QEWLPO.js";import{a as p}from"./chunks/chunk-MC5ZKPVM.js";import{a as v,d as _}from"./chunks/chunk-YQDXPF2Z.js";import"./chunks/chunk-54FJM6VZ.js";import"./chunks/chunk-3NNIP2AU.js";import{z as L}from"./chunks/chunk-7R2MEQJF.js";import"./chunks/chunk-6N3DIHG4.js";function R(){let t=L();return`sootsim CLI v${E()} \xB7 runtime ${t?`v${t}`:"not installed"}`}function g(){let t=k({bridgePort:7668,defaultShellUrl:p},l()),e=`
4
4
  ${_}
5
5
  `;console.log(`${R()}
6
6
  ${e}${t}
@@ -28,4 +28,4 @@ show the current shared desktop account used by the CLI and electron.
28
28
  it needs vite / electron / playwright from a project's node_modules.
29
29
  install the npm package and run via bun or node instead:
30
30
  npm i -g sootsim && sootsim ${t}
31
- `),process.exit(1))}var o=T(process.argv);{let{trackCliEvent:t}=await import("./chunks/telemetry-PBJ7ERBC.js");t({event:"cli_command_invoked",properties:{command:o.command||(o.version?"version":o.help?"help":"none"),arg_count:o.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}async function c(t){let{flushCliTelemetry:e}=await import("./chunks/telemetry-PBJ7ERBC.js");await e(),process.exit(t)}if(o.version){let{readFileSync:t}=await import("fs"),{fileURLToPath:e}=await import("url"),i=e(import.meta.resolve("sootsim/package.json")),m=JSON.parse(t(i,"utf8")),{IS_BETA:I,BETA_LABEL:y}=await import("./chunks/beta-HUTLG7S5.js"),D=I?` \xB7 ${y}`:"";console.log(`sootsim v${m.version}${D}`);let{readActiveRuntime:N}=await import("./chunks/home-paths-UQUVRQ4U.js"),b=N();console.log(b?`runtime v${b}`:"runtime not installed"),await c(0)}o.help&&!o.command&&(g(),await c(0));var a=o.globalFlags.port,s=o.verbose,d=o.globalFlags.device,f=o.globalFlags.theme,H=o.globalFlags.driver,Q=o.globalFlags.headless===!0,$=o.globalFlags.sim,n=$?["--sim",$,...o.commandArgs]:o.commandArgs;if(d||f){let{settingsStore:t}=await import("./chunks/store-KZH4YGAS.js"),e={};d&&(e.deviceModel=d),f&&(e.colorScheme=f),t.apply(e)}if(!o.command&&o.commandArgs.length===0){let{runStart:t}=await import("./chunks/start-VWUFFDUJ.js");await t([],{port:a}),await c(0)}var r=o.command??"";if(!r){if(o.commandArgs.length>0){let t=o.commandArgs.find(e=>!e.startsWith("-"))??o.commandArgs[0];console.error(` unknown command: ${t}`),console.error(" run `sootsim --help` to see the full surface."),await c(1)}g(),await c(0)}if(r in u){let t=u[r],e=o.commandArgs.length>0?` ${o.commandArgs.join(" ")}`:"";console.error(` \`sootsim ${r}\` was removed. use \`${t}\` instead.`),e&&console.error(` \u2192 ${t}${e}`),console.error(" run `sootsim --help` to see the new verb groups."),await c(1)}if(o.help||o.commandArgs.includes("--help")||o.commandArgs.includes("-h")){let t=r==="do"||r==="get"||r==="debug"||r==="shell"||r==="wait",e=o.commandArgs.find(i=>!i.startsWith("-"));r==="shell"||(t&&!e?O(r)&&await c(0):(h(t&&e?e:r),await c(0)))}F(r);if(C.has(r)){let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-SHBSE54I.js"),i=e(n,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-6E4HV34I.js");await m([r,...n],{port:i,verbose:s})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-WXUMY4WQ.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-6P474SWM.js"),e=await t(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-TK7FINPS.js");await t(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-W2RYM6BG.js");await t(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-Y26D3HN5.js"),e=await t(o.commandArgs,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"preview":{let{runPreview:t}=await import("./chunks/preview-JYFSFZ4J.js");await t(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:t}=await import("./chunks/record-7FXCSWQ4.js");await t(n,{port:a,verbose:s});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-UEL5Q6F6.js"),e=await t(o.commandArgs,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"cpu-profile":{let{runCpuProfile:t}=await import("./chunks/cpu-profile-OL2VPDCX.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"react":{let{runReact:t}=await import("./chunks/react-7FIMNUQ6.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot":{let{runScreenshot:t}=await import("./chunks/screenshot-ZYXLM2YB.js");await t(n,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-DFKJAKBF.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot-mode":{let{runScreenshotMode:t}=await import("./chunks/screenshot-mode-CJ2G6CPK.js");await t(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-RBLRHOPV.js");await t(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-6E4HV34I.js");await t(n,{port:a,verbose:s});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-4ONAV32N.js");await t(n,{port:a,verbose:s});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-HK3AO5R7.js");await t(n,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-LXCQCYF3.js");await t(n,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-ZU7OZQ2A.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"open":{let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-SHBSE54I.js"),i=e(n,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-BKBHXPZP.js");await m(n,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-BKBHXPZP.js");await t(n,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-BKBHXPZP.js");await t(n,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-BKBHXPZP.js");await t(n,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-OSEZ3KWG.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-T4VS4T3K.js");await t(n,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-7Z7M6PD5.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-YPZABLAA.js");await t(o.commandArgs,{port:a,device:d,driver:H});break}case"login":{let{runLogin:t}=await import("./chunks/login-DP4UYZZZ.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-QUVFZJN6.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-QIYDODGD.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-ZFI5OOFG.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-HMDFTMDA.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-55S5HGKP.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-676SA6NV.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-7IKLGAS3.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-G3ON7OHZ.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-CNLDNL2W.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-2LKSTHYL.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-VNV77QV6.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-VWUFFDUJ.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-AX2IIGGA.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-CYIA4WBO.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-PQU7B22X.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-LDVG27PU.js");await t(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:t}=await import("./chunks/hints-Z3UOKTIN.js");t(o.commandArgs);break}default:console.error(` unknown command: ${r}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
31
+ `),process.exit(1))}var o=T(process.argv);{let{trackCliEvent:t}=await import("./chunks/telemetry-VSTRFNEA.js");t({event:"cli_command_invoked",properties:{command:o.command||(o.version?"version":o.help?"help":"none"),arg_count:o.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}async function c(t){let{flushCliTelemetry:e}=await import("./chunks/telemetry-VSTRFNEA.js");await e(),process.exit(t)}if(o.version){let{readFileSync:t}=await import("fs"),{fileURLToPath:e}=await import("url"),i=e(import.meta.resolve("sootsim/package.json")),m=JSON.parse(t(i,"utf8")),{IS_BETA:I,BETA_LABEL:y}=await import("./chunks/beta-RZOPHEAW.js"),D=I?` \xB7 ${y}`:"";console.log(`sootsim v${m.version}${D}`);let{readActiveRuntime:N}=await import("./chunks/home-paths-PGYAOSK4.js"),b=N();console.log(b?`runtime v${b}`:"runtime not installed"),await c(0)}o.help&&!o.command&&(g(),await c(0));var a=o.globalFlags.port,s=o.verbose,d=o.globalFlags.device,f=o.globalFlags.theme,H=o.globalFlags.driver,Q=o.globalFlags.headless===!0,$=o.globalFlags.sim,n=$?["--sim",$,...o.commandArgs]:o.commandArgs;if(d||f){let{settingsStore:t}=await import("./chunks/store-BNKVWXJ7.js"),e={};d&&(e.deviceModel=d),f&&(e.colorScheme=f),t.apply(e)}if(!o.command&&o.commandArgs.length===0){let{runStart:t}=await import("./chunks/start-MYAVE26X.js");await t([],{port:a}),await c(0)}var r=o.command??"";if(!r){if(o.commandArgs.length>0){let t=o.commandArgs.find(e=>!e.startsWith("-"))??o.commandArgs[0];console.error(` unknown command: ${t}`),console.error(" run `sootsim --help` to see the full surface."),await c(1)}g(),await c(0)}if(r in u){let t=u[r],e=o.commandArgs.length>0?` ${o.commandArgs.join(" ")}`:"";console.error(` \`sootsim ${r}\` was removed. use \`${t}\` instead.`),e&&console.error(` \u2192 ${t}${e}`),console.error(" run `sootsim --help` to see the new verb groups."),await c(1)}if(o.help||o.commandArgs.includes("--help")||o.commandArgs.includes("-h")){let t=r==="do"||r==="get"||r==="debug"||r==="shell"||r==="wait",e=o.commandArgs.find(i=>!i.startsWith("-"));r==="shell"||(t&&!e?O(r)&&await c(0):(h(t&&e?e:r),await c(0)))}F(r);if(C.has(r)){let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-UI3237L3.js"),i=e(n,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-QUBG2EE3.js");await m([r,...n],{port:i,verbose:s})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-BZSHUDEX.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-KD74WWWV.js"),e=await t(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-NO4O5W4H.js");await t(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-PCDMPG7C.js");await t(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-35BUDZJN.js"),e=await t(o.commandArgs,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"preview":{let{runPreview:t}=await import("./chunks/preview-KGBAJEH2.js");await t(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:t}=await import("./chunks/record-VIAGV72T.js");await t(n,{port:a,verbose:s});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-BVWQI3HR.js"),e=await t(o.commandArgs,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"cpu-profile":{let{runCpuProfile:t}=await import("./chunks/cpu-profile-AXUDQSZF.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"react":{let{runReact:t}=await import("./chunks/react-JROJZ3IQ.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot":{let{runScreenshot:t}=await import("./chunks/screenshot-HJOUIADZ.js");await t(n,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-XRDHWLVP.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot-mode":{let{runScreenshotMode:t}=await import("./chunks/screenshot-mode-CZWXUAOB.js");await t(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-YGT4C3B3.js");await t(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-QUBG2EE3.js");await t(n,{port:a,verbose:s});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-GSPR2FNZ.js");await t(n,{port:a,verbose:s});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-Y7524K3O.js");await t(n,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-3GWD7CES.js");await t(n,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-4W66H3TN.js"),e=await t(n,{port:a,verbose:s});process.exit(typeof e=="number"?e:0)}case"open":{let{ensureSootsimReady:t,resolveBootstrapPort:e}=await import("./chunks/auto-bootstrap-UI3237L3.js"),i=e(n,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-RTC726XA.js");await m(n,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-RTC726XA.js");await t(n,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-RTC726XA.js");await t(n,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-RTC726XA.js");await t(n,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-2CZ2X42N.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-HAOQGYQ5.js");await t(n,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-GHXFTPVU.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-DEZKIML3.js");await t(o.commandArgs,{port:a,device:d,driver:H});break}case"login":{let{runLogin:t}=await import("./chunks/login-2ZHP4WJ5.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-ZXQX634G.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-TQW5UROJ.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-JDM4S4NA.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-LT5NHTRW.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-5S3T2PJH.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-F6H6MZ24.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-URN2JGBT.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-OYT4MNW5.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-V3JIGNUF.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-ZFAPXF7U.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-A6MX4EZ6.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-MYAVE26X.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-K264P3HZ.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-XS4C3CTX.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-NIJL5BJB.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-4OOPAZEV.js");await t(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:t}=await import("./chunks/hints-5B7UEOTA.js");t(o.commandArgs);break}default:console.error(` unknown command: ${r}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as y,b as $,c as b,d as l,e as E,g as A,h as j,j as S,m as I,n as T,o as x,p as g,q as k,r as D}from"./chunk-Z4X6PVCT.js";import"./chunk-ZVO4ABLX.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import w from"node:fs";import d from"node:path";import{spawn as N}from"node:child_process";import U from"node:net";import{WebSocket as O}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new O(`ws://localhost:${this.port}`),this.ready=new Promise((t,s)=>{let r=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",r),s(new c(`could not connect to sootsim daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",r),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==O.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let s=this.nextId++;return new Promise((r,o)=>{let i=setTimeout(()=>{this.pending.delete(s),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(s,{resolve:r,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:s,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(s),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let r of this.eventListeners)try{r({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let r of this.statusListeners)try{r(t.session)}catch{}return}if(typeof t.id!="number")return;let s=this.pending.get(t.id);s&&(this.pending.delete(t.id),clearTimeout(s.timer),t.error?s.reject(new c(t.error,t.code)):s.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function R(n=7668,e=400){return new Promise(t=>{let s=new U.Socket,r=!1,o=i=>{r||(r=!0,s.destroy(),t(i))};s.setTimeout(e),s.once("connect",()=>o(!0)),s.once("timeout",()=>o(!1)),s.once("error",()=>o(!1)),s.connect(n,"127.0.0.1")})}async function _(n={}){let e=n.port??7668;if(await R(e))return{alreadyRunning:!0};let{cmd:t,prefixArgs:s}=D(),r=[...s,"server","--quiet"];e!==7668&&r.push("--port",String(e));let o=N(t,r,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await R(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned sootsim daemon on port ${e} but it did not come up in time. run \`sootsim server\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await _({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ue(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return C(),0;case"attach":return await F(t);case"projects":return await B();case"project":return await W(t);case"sessions":return await J(t);case"start":return await V(t);case"prompt":return await q(t);case"watch":return await G(t);case"transcript":return await H(t);case"end":return await K(t);case"paths":return await z();default:return process.stderr.write(`unknown agent subcommand: ${e}
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as y,b as $,c as b,d as l,e as E,g as A,h as j,j as S,m as I,n as T,o as x,p as g,q as k,r as D}from"./chunk-5BU4OSGL.js";import"./chunk-V3KUGR6L.js";import"./chunk-3NNIP2AU.js";import"./chunk-7R2MEQJF.js";import"./chunk-6N3DIHG4.js";import w from"node:fs";import d from"node:path";import{spawn as N}from"node:child_process";import U from"node:net";import{WebSocket as O}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new O(`ws://localhost:${this.port}`),this.ready=new Promise((t,s)=>{let r=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",r),s(new c(`could not connect to sootsim daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",r),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==O.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let s=this.nextId++;return new Promise((r,o)=>{let i=setTimeout(()=>{this.pending.delete(s),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(s,{resolve:r,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:s,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(s),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let r of this.eventListeners)try{r({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let r of this.statusListeners)try{r(t.session)}catch{}return}if(typeof t.id!="number")return;let s=this.pending.get(t.id);s&&(this.pending.delete(t.id),clearTimeout(s.timer),t.error?s.reject(new c(t.error,t.code)):s.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function R(n=7668,e=400){return new Promise(t=>{let s=new U.Socket,r=!1,o=i=>{r||(r=!0,s.destroy(),t(i))};s.setTimeout(e),s.once("connect",()=>o(!0)),s.once("timeout",()=>o(!1)),s.once("error",()=>o(!1)),s.connect(n,"127.0.0.1")})}async function _(n={}){let e=n.port??7668;if(await R(e))return{alreadyRunning:!0};let{cmd:t,prefixArgs:s}=D(),r=[...s,"server","--quiet"];e!==7668&&r.push("--port",String(e));let o=N(t,r,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await R(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned sootsim daemon on port ${e} but it did not come up in time. run \`sootsim server\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await _({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ue(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return C(),0;case"attach":return await F(t);case"projects":return await B();case"project":return await W(t);case"sessions":return await J(t);case"start":return await V(t);case"prompt":return await q(t);case"watch":return await G(t);case"transcript":return await H(t);case"end":return await K(t);case"paths":return await z();default:return process.stderr.write(`unknown agent subcommand: ${e}
3
3
  `),C(),2}}catch(s){if(s instanceof c)return process.stderr.write(`${s.message}
4
4
  `),1;throw s}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function C(){process.stdout.write(`sootsim agent \u2014 attached projects + local agent sessions
5
5
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as M}from"./chunk-ZVO4ABLX.js";import"./chunk-HFYLZ5KC.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as I,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,g=!1,a=new Promise(s=>{t.on("exit",(i,e)=>{g=!0;let p=new Error(`codex app-server exited (code=${i}, signal=${e??""})`);for(let{reject:f}of r.values())f(p);r.clear(),s({code:i,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let i=s.trim();if(!i)return;let e;try{e=JSON.parse(i)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,f=p!=null?r.get(p):void 0;if(!f)return;r.delete(p),e.error?f.reject(new b(e.error.message,e.error.code,e.error.data)):f.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let f of p)try{f(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let i=m.get("__stderr__");if(i)for(let e of i)try{e({text:s})}catch{}});function n(s){if(!g)try{t.stdin.write(JSON.stringify(s)+`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as M}from"./chunk-V3KUGR6L.js";import"./chunk-6N3DIHG4.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as I,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,g=!1,a=new Promise(s=>{t.on("exit",(i,e)=>{g=!0;let p=new Error(`codex app-server exited (code=${i}, signal=${e??""})`);for(let{reject:f}of r.values())f(p);r.clear(),s({code:i,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let i=s.trim();if(!i)return;let e;try{e=JSON.parse(i)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,f=p!=null?r.get(p):void 0;if(!f)return;r.delete(p),e.error?f.reject(new b(e.error.message,e.error.code,e.error.data)):f.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let f of p)try{f(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let i=m.get("__stderr__");if(i)for(let e of i)try{e({text:s})}catch{}});function n(s){if(!g)try{t.stdin.write(JSON.stringify(s)+`
3
3
  `)}catch{}}return{exited:a,on(s,i){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(i),()=>{e?.delete(i)}},request(s,i){if(g)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,f)=>{r.set(e,{resolve:l=>p(l),reject:f,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:i})})},notify(s,i){n({jsonrpc:"2.0",method:s,params:i})},async shutdown(s=1500){if(g)return;try{t.stdin.end()}catch{}let i=setTimeout(()=>{if(!g)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(i)}},kill(s="SIGTERM"){if(!g)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return I(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let g=t[u];g&&(r[g]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: sootsim agent-wrapper --session-id <id> --project-id <id>
4
4
  --provider codex|claude --cwd <path>
5
5
  --prompt-in <fifo> --events-out <fifo>
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-HFYLZ5KC.js";import{spawn as x}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=x(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-6N3DIHG4.js";import{spawn as x}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=x(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
3
3
  `).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=x("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
4
4
  `),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
5
5
  supported: ${Array.from(w).sort().join(", ")}
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-BZCJZDQG.js";import"./chunk-MOQ456TZ.js";import"./chunk-7VUK4YQR.js";import"./chunk-3NNIP2AU.js";import"./chunk-7R2MEQJF.js";import"./chunk-6N3DIHG4.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-YQDXPF2Z.js";import"./chunk-6N3DIHG4.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{v as p}from"./chunk-NTQIMLT6.js";import{d as u,h as m,i as w}from"./chunk-DMW52773.js";var y={timeoutMs:1800,settleMs:48,startWindowMs:64};function c(e){return new Promise(t=>setTimeout(t,e))}function h(e){return e.includes("--json")}function S(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{v as p}from"./chunk-CCXT5QH6.js";import{d as u,h as m,i as w}from"./chunk-MOQ456TZ.js";var y={timeoutMs:1800,settleMs:48,startWindowMs:64};function c(e){return new Promise(t=>setTimeout(t,e))}function h(e){return e.includes("--json")}function S(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
3
  `)}async function g(e,t,...r){return m(e,`__sootsimTest.${t}`,...r)}async function f(e,t,...r){return w(e,`SootSim.bridges.mainShell.${t}`,...r)}async function T(e,t={}){try{let r=await g(e,"waitForScreenTransitions",y);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function v(e,t,r,...n){let o=Date.now()+Math.max(0,r);for(;;)try{return await f(e,t,...n)}catch(s){if(!p(s)||Date.now()>=o)throw s;await c(50)}}async function x(e,t,r,n={}){let o=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<o;a++){let l=u(e,{commandTimeoutMs:t,simId:r});try{let d=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof d=="number"&&d>i)return{bridge:l,count:d}}catch{}l.close(),await c(s)}return null}async function _(e,t,r,n={}){let o=n.timeoutMs??8e3,s=n.intervalMs??250,i=Date.now()+o;for(;Date.now()<i;){let a=u(e,{commandTimeoutMs:t,simId:r});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await c(s)}return null}async function W(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,o=t.pollIntervalMs??200;return await e.send({type:"evaluate",code:`(async () => {
4
4
  const start = Date.now()
5
5
  const deadline = start + ${r}
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var O="sootsim close";export{O as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},c={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},a=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:d},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:c},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:c}},u="iphone-17-pro";function b(e){return h[e]}function g(){return Object.keys(h)}var n={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},S="iphone-17-pro";function v(e){return Object.prototype.hasOwnProperty.call(n,e)?n[e]:null}function f(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(r=>({...r}))}}function B(e){return Object.prototype.hasOwnProperty.call(s,e)?f(s[e]):null}var p={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(n),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let r=new URLSearchParams(window.location.search),i=r.get("device");i&&p.deviceModel.options?.includes(i)&&(e.deviceModel=i);let l=r.get("colorScheme")??r.get("theme");l&&p.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function H(){let e={};for(let[r,i]of Object.entries(p))e[r]=i.default;return Object.assign(e,y()),e}export{P as a,S as b,v as c,f as d,B as e,h as f,b as g,g as h,p as i,y as j,H as k};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-ZVO4ABLX.js";import{l as D}from"./chunk-UAVOHNUW.js";import{a as T}from"./chunk-HFYLZ5KC.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("./demo-app-registry-RZ3S32T3.js")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R}from"./chunk-V3KUGR6L.js";import{l as D}from"./chunk-7R2MEQJF.js";import{a as T}from"./chunk-6N3DIHG4.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("./demo-app-registry-TCS63ZRQ.js")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
3
3
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Re(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(O(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=j(e),n=h();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ne(e,t){let r=J(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,f.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ee.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let c=I(d);c&&t(c)});let a=!1;return()=>{if(!a){a=!0;try{s.close()}catch{}try{o.destroy()}catch{}}}}async function ae(e,t,r){let n=i.openSync(e,f.O_RDWR|f.O_NONBLOCK),o=Buffer.alloc(8192),s="",a=Date.now()+r;try{for(;Date.now()<a;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(c){if(c.code!=="EAGAIN")throw c;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let c;for(;(c=s.indexOf(`
4
4
  `))>=0;){let g=s.slice(0,c);s=s.slice(c+1);let A=I(g);if(A&&t(A))return A}}else await new Promise(c=>setTimeout(c,30))}return null}finally{i.closeSync(n)}}export{I as a,h as b,ge as c,F as d,ye as e,he as f,Se as g,we as h,k as i,C as j,v as k,ve as l,j as m,W as n,J as o,te as p,O as q,re as r,l as s,Te as t,De as u,Re as v,Ne as w};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as s}from"./chunk-Z3OFWNVG.js";import{w as o}from"./chunk-UAVOHNUW.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as s}from"./chunk-CDOIENTA.js";import{w as o}from"./chunk-7R2MEQJF.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (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
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import r from"node:fs";import{homedir as O}from"node:os";import n from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",j="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?n.resolve(e):n.join(O(),".sootsim")}function K(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${n.sep}packages${n.sep}sootsim${n.sep}`)}catch{return!1}}function f(){return n.join(c(),"runtimes")}function _(e){return n.join(f(),e)}function D(){return n.join(f(),E)}function S(){return n.join(c(),"electron")}function U(){return n.join(S(),"userData")}function Y(e){return n.join(S(),e)}function N(){return n.join(c(),"profiles")}function F(){return n.join(c(),"daemon-app")}function T(){return n.join(F(),"SootSim Daemon.app")}function G(){return n.join(T(),"Contents","MacOS","sootsim-daemon")}function C(){return n.join(c(),"cache")}function p(){return n.join(c(),A)}function d(){return n.join(c(),j)}function v(){try{let e=r.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function M(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return r.writeFileSync(u,`${JSON.stringify(s,null,2)}
3
3
  `,"utf8"),r.renameSync(u,d()),s}function X(){return v().telemetry!==!1}function q(e){M({telemetry:e})}function y(){r.mkdirSync(c(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(S(),{recursive:!0}),r.mkdirSync(N(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0})}function w(){try{let e=r.readFileSync(D(),"utf8").trim();return e.length>0?e:null}catch{return null}}function z(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(D(),`${e}
4
4
  `,"utf8")}function Q(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(P)}catch{return[]}}function P(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,k=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,k]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function W(){let e=w();if(!e)return null;let t=_(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var h=16*1024;function R(){try{let e=r.openSync(p(),"r");try{let t=Buffer.alloc(h),s=r.readSync(e,t,0,h,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{r.closeSync(e)}}catch{return null}}function $(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function H(e){y();let t=`${p()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{existsSync as C,mkdirSync as D,readFileSync as O,rmSync as s,writeFileSync as g}from"fs";import{tmpdir as P}from"os";import{dirname as R,join as A,resolve as x}from"path";import{execFileSync as a}from"child_process";import{readFileSync as I}from"fs";import{createRequire as S}from"module";var o=null;function u(r){o||(o=_());try{return o(r)}catch{return null}}function _(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=E();return n||T()}return()=>null}function y(){return r=>{try{let n=I(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,b=16;function E(){if(!process.versions?.bun)return null;try{let r=S(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return m=>{if(Number(i.symbols.proc_pidinfo(m,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(b);return p>0?p:null}}catch{return null}}function T(){return r=>{try{let t=a("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
3
3
  `)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",v=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function F(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of v){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=F(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function l(){if(process.env[f])return x(process.env[f]);let r=L();return A(P(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!C(r))return null;try{let n=JSON.parse(O(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function J(){return h()?.simId||null}function j(r){let n=r.trim();if(!n)return;let t=l();D(R(t),{recursive:!0}),g(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
4
4
  `)}function K(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as p,spawn as l}from"child_process";import{existsSync as s}from"fs";import{homedir as u}from"os";import{join as d}from"path";var g=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],f=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],h=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],C=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],O=["chrome","msedge","brave"];function w(r){return r.startsWith("~/")?d(u(),r.slice(2)):r}function a(r){for(let n of r){let o=w(n);if(s(o))return o}return null}function U(r,n){try{let e=p(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function M(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&s(n))return n;let o=a(r==="darwin"?g:r==="win32"?h:f);if(o)return o;let e=r==="win32"?O:C;for(let t of e){let i=U(t,r);if(i)return i}return null}function A(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?c(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function c(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:M(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function m(r,n,o){return new Promise((e,t)=>{let i=l(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function x(r,n={}){let o=A(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function y(r,n={}){let o=c(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function E(r,n={}){await x(r,n)}export{M as a,x as b,y as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as l,e as d,h as c}from"./chunk-DMW52773.js";function g(n){let e=n[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(n,e,o){let s=l(n,{port:e.port}),a=g(s.positional),r=d({...s,commandTimeoutMs:5e3});try{let i=!!(await c(r,"SootSim.bridges.settings.get"))?.[o.modeKey],t=a==="on"?!0:a==="off"?!1:!i;if(i===t){console.log(` ${o.displayName}: already ${t?"on":"off"}`);return}if(!await r.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as l,e as d,h as c}from"./chunk-MOQ456TZ.js";function g(n){let e=n[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(n,e,o){let s=l(n,{port:e.port}),a=g(s.positional),r=d({...s,commandTimeoutMs:5e3});try{let i=!!(await c(r,"SootSim.bridges.settings.get"))?.[o.modeKey],t=a==="on"?!0:a==="off"?!1:!i;if(i===t){console.log(` ${o.displayName}: already ${t?"on":"off"}`);return}if(!await r.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(o.modeKey)}
4
4
  const target = ${JSON.stringify(t)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as L}from"./chunk-HFYLZ5KC.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as L}from"./chunk-6N3DIHG4.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
3
3
  `)}
4
4
  `)}function ie(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
5
5
  `,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,b as v}from"./chunk-HDDGAW2M.js";import{d as j}from"./chunk-5ZDXHLTR.js";import{a as b}from"./chunk-77DLIFAS.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,b as v}from"./chunk-Q223YQKG.js";import{d as j}from"./chunk-BZCJZDQG.js";import{a as b}from"./chunk-5E3D5ITF.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
3
3
  `).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
4
  sootsim setup-repo \u2014 set up sootsim in your project
5
5
 
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-DMW52773.js";import{E as u,F as c,g as p,i as h,z as w}from"./chunk-UAVOHNUW.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-CNLDNL2W.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await m(t,250))return;let n=u();if(n&&c(n)){if(n.bootstrapping===!0&&(await b(e),await m(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l}from"./chunk-MOQ456TZ.js";import{E as u,F as c,g as p,i as h,z as w}from"./chunk-7R2MEQJF.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-V3JIGNUF.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await m(t,250))return;let n=u();if(n&&c(n)){if(n.bootstrapping===!0&&(await b(e),await m(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
3
3
  dev checkouts skip the auto-install of the persistent launchd / systemd
4
4
  agent. start the daemon manually in another shell with:
5
5
  bun sootsim server
6
- (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-G3ON7OHZ.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
6
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-OYT4MNW5.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
7
7
  if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await m(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function m(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=u();if(o&&c(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u}from"./chunk-VOYMDSN6.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u}from"./chunk-54FJM6VZ.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
3
3
  <div
4
4
  aria-hidden="true"
5
5
  style="
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  async function y(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function p(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function m(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function g(e,t){let n=`(async () => {
3
3
  const t = window.__sootsimTest
4
4
  const mainShell = window.SootSim?.bridges?.mainShell
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{l as c}from"./chunk-UAVOHNUW.js";import{chmodSync as m,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as l,join as D,resolve as p}from"node:path";var s=1,S="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function v(){let t=process.env[S];return t?.trim()?l(p(t)):c()}function a(){let t=process.env[S];return t?.trim()?p(t):D(v(),"desktop-auth.json")}function f(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0}}function w(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:f(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=w(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function I(t){let e=a();k(l(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?f(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{l as c}from"./chunk-7R2MEQJF.js";import{chmodSync as m,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as l,join as D,resolve as p}from"node:path";var s=1,S="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function v(){let t=process.env[S];return t?.trim()?l(p(t)):c()}function a(){let t=process.env[S];return t?.trim()?p(t):D(v(),"desktop-auth.json")}function f(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0}}function w(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:f(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=w(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function I(t){let e=a();k(l(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?f(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{m(e,384)}catch{}return r}function d(){i(a(),{force:!0})}async function N(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return d(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?I({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(d(),null)}catch{return e}}export{O as a,I as b,d as c,N as d};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{i as n}from"./chunk-VOYMDSN6.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{i as n}from"./chunk-54FJM6VZ.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
3
  `)}export{g as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-VOYMDSN6.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-54FJM6VZ.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as d}from"./chunk-DMW52773.js";import{a as p,d as w,h as $,j as y}from"./chunk-X46E3R6L.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-UAVOHNUW.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as d}from"./chunk-MOQ456TZ.js";import{a as p,d as w,h as $,j as y}from"./chunk-VFYDSE5J.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-7R2MEQJF.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
3
3
  sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
4
4
 
5
5
  usage:
@@ -22,4 +22,4 @@ examples:
22
22
  sootsim runtime install 1.2.3
23
23
  sootsim runtime install --channel beta
24
24
  sootsim runtime use 1.2.3
25
- `)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-UQUVRQ4U.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
25
+ `)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-PGYAOSK4.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as bs}from"./chunk-HFYLZ5KC.js";var oi=`(async () => {
1
+ /*! sootsim v0.1.50 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as bs}from"./chunk-6N3DIHG4.js";var oi=`(async () => {
3
3
  try { localStorage.clear() } catch {}
4
4
  try { sessionStorage.clear() } catch {}
5
5
  try {