sootsim 0.1.44 → 0.1.46

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 (137) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-NVU7E7EV.js → agent-4SFE3DNP.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-CLEYNPJK.js → agent-wrapper-BCXD55HW.js} +2 -2
  4. package/dist-cli/chunks/{assert-F7B6TVEQ.js → assert-ILRVN6CB.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-A4ML6QTW.js +2 -0
  6. package/dist-cli/chunks/beta-34TOAZFI.js +2 -0
  7. package/dist-cli/chunks/{chunk-ECIHLBNE.js → chunk-4OPZYTVB.js} +1 -1
  8. package/dist-cli/chunks/{chunk-IMTTDIJJ.js → chunk-7CZ5VL7E.js} +1 -1
  9. package/dist-cli/chunks/{chunk-F76MMAMV.js → chunk-BVXZZOBA.js} +2 -2
  10. package/dist-cli/chunks/{chunk-HIQJTM66.js → chunk-DGAHFMAU.js} +2 -2
  11. package/dist-cli/chunks/{chunk-KWU3WMFD.js → chunk-FCFKR7EM.js} +4 -4
  12. package/dist-cli/chunks/{chunk-54V7OVL6.js → chunk-FLJAN5PS.js} +2 -2
  13. package/dist-cli/chunks/{chunk-4ZA3J2BV.js → chunk-GWOV6KFE.js} +1 -1
  14. package/dist-cli/chunks/{chunk-LCDWXJ6X.js → chunk-H46ZLTT5.js} +1 -1
  15. package/dist-cli/chunks/{chunk-JK3BWGI5.js → chunk-K3I6VLF3.js} +1 -1
  16. package/dist-cli/chunks/{chunk-IIFZNK4R.js → chunk-KETYRULQ.js} +2 -2
  17. package/dist-cli/chunks/chunk-KV7XS7WL.js +1 -0
  18. package/dist-cli/chunks/{chunk-7PUVSCSF.js → chunk-M5HZVUQQ.js} +1 -1
  19. package/dist-cli/chunks/{chunk-6TO2XBUK.js → chunk-MDSET24U.js} +2 -2
  20. package/dist-cli/chunks/chunk-MGEB3WEI.js +117 -0
  21. package/dist-cli/chunks/{chunk-QB4INK6X.js → chunk-MJD6C3BG.js} +2 -2
  22. package/dist-cli/chunks/{chunk-FBCGPPDA.js → chunk-N7DDQ5ZB.js} +2 -2
  23. package/dist-cli/chunks/{chunk-L7V75VQK.js → chunk-OHI4DJSD.js} +1 -1
  24. package/dist-cli/chunks/{chunk-BU7OXA7Y.js → chunk-OMPAUB4V.js} +3 -3
  25. package/dist-cli/chunks/{chunk-EAMMI2FH.js → chunk-OZICEBUA.js} +2 -2
  26. package/dist-cli/chunks/{chunk-ZZOYYBLO.js → chunk-PAOOYAVI.js} +2 -2
  27. package/dist-cli/chunks/{chunk-ZNMOLPG5.js → chunk-PEXPACO5.js} +1 -1
  28. package/dist-cli/chunks/{chunk-K4BRBIGO.js → chunk-PG6FUKZX.js} +2 -2
  29. package/dist-cli/chunks/{chunk-VP52RZT7.js → chunk-PKVNCXQD.js} +2 -2
  30. package/dist-cli/chunks/{chunk-WLH4MLBC.js → chunk-PRRVFNFG.js} +2 -2
  31. package/dist-cli/chunks/{chunk-RN5LEOFJ.js → chunk-QXJR74QV.js} +1 -1
  32. package/dist-cli/chunks/chunk-RSMU24BE.js +1 -0
  33. package/dist-cli/chunks/{chunk-YWBUHBLD.js → chunk-S4OSFQIC.js} +2 -2
  34. package/dist-cli/chunks/{chunk-GLLMLIXC.js → chunk-SG7ICXM2.js} +3 -3
  35. package/dist-cli/chunks/chunk-T4H37KU7.js +2 -0
  36. package/dist-cli/chunks/chunk-UH5PKJXT.js +1 -0
  37. package/dist-cli/chunks/chunk-VWJ4O366.js +1 -0
  38. package/dist-cli/chunks/{chunk-VQKQSSUD.js → chunk-W52DGZNV.js} +1 -1
  39. package/dist-cli/chunks/{chunk-6QY5P2H6.js → chunk-WD36PEEJ.js} +2 -2
  40. package/dist-cli/chunks/{chunk-LCUVF6MI.js → chunk-WRNSX5RR.js} +2 -2
  41. package/dist-cli/chunks/{chunk-OBIALIWI.js → chunk-WWEMLI77.js} +1 -1
  42. package/dist-cli/chunks/{chunk-E3DHOL7O.js → chunk-X7P3CGPY.js} +3 -3
  43. package/dist-cli/chunks/{chunk-NMFN4EIE.js → chunk-XKNZR4BB.js} +2 -2
  44. package/dist-cli/chunks/{chunk-MS5QBIOB.js → chunk-XSJ4SU63.js} +31 -31
  45. package/dist-cli/chunks/{chunk-VFUO52ZQ.js → chunk-XT36ZR2H.js} +1 -1
  46. package/dist-cli/chunks/{chunk-2Q5YKX76.js → chunk-XU27QCRX.js} +1 -1
  47. package/dist-cli/chunks/{chunk-B4B6RECG.js → chunk-YZ7BSNJJ.js} +2 -2
  48. package/dist-cli/chunks/{chunk-T5UKNA5K.js → chunk-Z6BJVYOU.js} +1 -1
  49. package/dist-cli/chunks/{chunk-YROS5I43.js → chunk-Z7J6LG53.js} +2 -2
  50. package/dist-cli/chunks/chunk-ZM4JL3VP.js +11 -0
  51. package/dist-cli/chunks/{compat-5XJPHPPL.js → compat-IC7P6QWF.js} +3 -3
  52. package/dist-cli/chunks/{config-SHZ662ER.js → config-WVL2Y7UU.js} +2 -2
  53. package/dist-cli/chunks/control-7VDRDQXQ.js +2 -0
  54. package/dist-cli/chunks/cpu-profile-FJIMZKXF.js +2 -0
  55. package/dist-cli/chunks/{daemon-QRHS6CAR.js → daemon-TH7B22C4.js} +2 -2
  56. package/dist-cli/chunks/{debug-CRQNVODN.js → debug-MN6RXRJO.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-ISNBFJTI.js +2 -0
  58. package/dist-cli/chunks/{detox-PEPICVRX.js → detox-BUJ3IOIB.js} +2 -2
  59. package/dist-cli/chunks/{device-4GRKBTIY.js → device-MUCGW2TT.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-FRGJNGVH.js → diagnose-5NADXMRL.js} +2 -2
  61. package/dist-cli/chunks/drivers-RXVSKXUD.js +2 -0
  62. package/dist-cli/chunks/{electron-KAAQYVLY.js → electron-ON6434HQ.js} +3 -3
  63. package/dist-cli/chunks/flow-WI5MN76X.js +2 -0
  64. package/dist-cli/chunks/{hints-JDTUIEQI.js → hints-23C3BW62.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-MCK43U6W.js → home-paths-DAI3XZLG.js} +2 -2
  66. package/dist-cli/chunks/{inspect-2ORQQN7T.js → inspect-UVS4UIJF.js} +91 -91
  67. package/dist-cli/chunks/install-QKH2JQGE.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-YEGVQFNS.js → install-desktop-6BT3VL2C.js} +3 -3
  69. package/dist-cli/chunks/{keys-2QRSFPVS.js → keys-4OT37H4C.js} +2 -2
  70. package/dist-cli/chunks/{launch-L25GI237.js → launch-2C3YGABQ.js} +3 -3
  71. package/dist-cli/chunks/{login-FHC2PLFD.js → login-NWY5ENAT.js} +4 -4
  72. package/dist-cli/chunks/{logout-FJQU7HI2.js → logout-6BHGSVMN.js} +2 -2
  73. package/dist-cli/chunks/{maestro-Z6YMB7VM.js → maestro-V7WIYUNE.js} +2 -2
  74. package/dist-cli/chunks/{preview-7ZCBU2IE.js → preview-H2ACZ26A.js} +2 -2
  75. package/dist-cli/chunks/{profile-JTJF6PY6.js → profile-ZLDFCIZA.js} +2 -2
  76. package/dist-cli/chunks/{react-XP2AJQ4T.js → react-PEM4I7YB.js} +2 -2
  77. package/dist-cli/chunks/record-KVBDN3GC.js +18 -0
  78. package/dist-cli/chunks/runtime-LLWAHSVR.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-O655KIUB.js → runtime-delivery-ECDTRILR.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-CPCNSTFP.js → screenshot-PJEMMFQO.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-MGWQGOM7.js → screenshot-mode-DKPHJONC.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-ZD7HJ4GA.js → screenshots-5UQ36N7Q.js} +2 -2
  83. package/dist-cli/chunks/{server-V55GYTFF.js → server-LADTO7OS.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-TXI7Q6F6.js +2 -0
  85. package/dist-cli/chunks/{skills-PGTMJCNI.js → skills-FUN6M66H.js} +2 -2
  86. package/dist-cli/chunks/{start-OB5MRSE4.js → start-A6FDAXGU.js} +4 -4
  87. package/dist-cli/chunks/store-KTDAA7SP.js +2 -0
  88. package/dist-cli/chunks/telemetry-VPFS3BGR.js +2 -0
  89. package/dist-cli/chunks/{test-OXVUTEEX.js → test-HPXQTADO.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-P6JQUJEA.js → three-mode-2APCW2N7.js} +2 -2
  91. package/dist-cli/chunks/{timeline-TVXCZIHI.js → timeline-6D6V6LRX.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-PDM3N57Q.js → upgrade-KZIO3ZJH.js} +2 -2
  93. package/dist-cli/chunks/upload-LDL3FZKD.js +2 -0
  94. package/dist-cli/chunks/{web-F5K7GAGR.js → web-MR4EQWCC.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-QE3IR6K4.js → what-happened-FHQD42JV.js} +2 -2
  96. package/dist-cli/chunks/{whoami-NPO62CNB.js → whoami-GHNFMMK4.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 +1 -1
  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 +1 -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 +1 -1
  115. package/dist-lib/vite.cjs +1 -1
  116. package/package.json +1 -1
  117. package/dist-cli/chunks/auto-bootstrap-BIH3TKGB.js +0 -2
  118. package/dist-cli/chunks/beta-DD7XOVXJ.js +0 -2
  119. package/dist-cli/chunks/chunk-2TU7QJGH.js +0 -1
  120. package/dist-cli/chunks/chunk-5A7UO4OE.js +0 -1
  121. package/dist-cli/chunks/chunk-KVJEI5YO.js +0 -1
  122. package/dist-cli/chunks/chunk-POPZHYTD.js +0 -117
  123. package/dist-cli/chunks/chunk-TXCWW2IX.js +0 -11
  124. package/dist-cli/chunks/chunk-ZLOUP7JS.js +0 -1
  125. package/dist-cli/chunks/chunk-ZP4PF72U.js +0 -2
  126. package/dist-cli/chunks/control-ONCNZDD5.js +0 -2
  127. package/dist-cli/chunks/cpu-profile-KFM3R5MY.js +0 -2
  128. package/dist-cli/chunks/demo-app-registry-GCDJ3DX7.js +0 -2
  129. package/dist-cli/chunks/drivers-LRMIFMFF.js +0 -2
  130. package/dist-cli/chunks/flow-P6N565XT.js +0 -2
  131. package/dist-cli/chunks/install-KVZFRP22.js +0 -2
  132. package/dist-cli/chunks/record-56JAGJUN.js +0 -17
  133. package/dist-cli/chunks/runtime-T2X2XY72.js +0 -2
  134. package/dist-cli/chunks/setup-repo-SGAHUDYC.js +0 -2
  135. package/dist-cli/chunks/store-SUEZBGQY.js +0 -2
  136. package/dist-cli/chunks/telemetry-COZXGX5D.js +0 -2
  137. package/dist-cli/chunks/upload-U55QDSSX.js +0 -2
package/dist-cli/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
- import{a as E}from"./chunks/chunk-T5UKNA5K.js";import{a as l}from"./chunks/chunk-QB4INK6X.js";import{a as A,b as k,c as S,d as C,e as u,f as T}from"./chunks/chunk-POPZHYTD.js";import{a as p}from"./chunks/chunk-ZP4PF72U.js";import{a as v,d as _}from"./chunks/chunk-VFUO52ZQ.js";import"./chunks/chunk-RN5LEOFJ.js";import"./chunks/chunk-5A7UO4OE.js";import{z as L}from"./chunks/chunk-7PUVSCSF.js";import"./chunks/chunk-4ZA3J2BV.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
+ import{a as E}from"./chunks/chunk-Z6BJVYOU.js";import{a as l}from"./chunks/chunk-MJD6C3BG.js";import{a as A,b as k,c as S,d as C,e as u,f as T}from"./chunks/chunk-MGEB3WEI.js";import{a as p}from"./chunks/chunk-T4H37KU7.js";import{a as v,d as _}from"./chunks/chunk-XT36ZR2H.js";import"./chunks/chunk-QXJR74QV.js";import"./chunks/chunk-VWJ4O366.js";import{z as L}from"./chunks/chunk-M5HZVUQQ.js";import"./chunks/chunk-GWOV6KFE.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-COZXGX5D.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-COZXGX5D.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-DD7XOVXJ.js"),D=I?` \xB7 ${y}`:"";console.log(`sootsim v${m.version}${D}`);let{readActiveRuntime:N}=await import("./chunks/home-paths-MCK43U6W.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-SUEZBGQY.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-OB5MRSE4.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-BIH3TKGB.js"),i=e(n,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-2ORQQN7T.js");await m([r,...n],{port:i,verbose:s})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-F7B6TVEQ.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-P6N565XT.js"),e=await t(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-OXVUTEEX.js");await t(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-PEPICVRX.js");await t(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-Z6YMB7VM.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-7ZCBU2IE.js");await t(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:t}=await import("./chunks/record-56JAGJUN.js");await t(n,{port:a,verbose:s});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-JTJF6PY6.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-KFM3R5MY.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-XP2AJQ4T.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-CPCNSTFP.js");await t(n,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-ZD7HJ4GA.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-MGWQGOM7.js");await t(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-P6JQUJEA.js");await t(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-2ORQQN7T.js");await t(n,{port:a,verbose:s});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-CRQNVODN.js");await t(n,{port:a,verbose:s});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-TVXCZIHI.js");await t(n,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-QE3IR6K4.js");await t(n,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-FRGJNGVH.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-BIH3TKGB.js"),i=e(n,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-ONCNZDD5.js");await m(n,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-ONCNZDD5.js");await t(n,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-ONCNZDD5.js");await t(n,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-ONCNZDD5.js");await t(n,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-SHZ662ER.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-4GRKBTIY.js");await t(n,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-5XJPHPPL.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-KAAQYVLY.js");await t(o.commandArgs,{port:a,device:d,driver:H});break}case"login":{let{runLogin:t}=await import("./chunks/login-FHC2PLFD.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-FJQU7HI2.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-NPO62CNB.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-2QRSFPVS.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-SGAHUDYC.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-KVZFRP22.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-YEGVQFNS.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-V55GYTFF.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-QRHS6CAR.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-T2X2XY72.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-PDM3N57Q.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-L25GI237.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-OB5MRSE4.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-NVU7E7EV.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-CLEYNPJK.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-PGTMJCNI.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-U55QDSSX.js");await t(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:t}=await import("./chunks/hints-JDTUIEQI.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-VPFS3BGR.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-VPFS3BGR.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-34TOAZFI.js"),D=I?` \xB7 ${y}`:"";console.log(`sootsim v${m.version}${D}`);let{readActiveRuntime:N}=await import("./chunks/home-paths-DAI3XZLG.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-KTDAA7SP.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-A6FDAXGU.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-A4ML6QTW.js"),i=e(n,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-UVS4UIJF.js");await m([r,...n],{port:i,verbose:s})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-ILRVN6CB.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-WI5MN76X.js"),e=await t(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-HPXQTADO.js");await t(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-BUJ3IOIB.js");await t(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-V7WIYUNE.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-H2ACZ26A.js");await t(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:t}=await import("./chunks/record-KVBDN3GC.js");await t(n,{port:a,verbose:s});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-ZLDFCIZA.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-FJIMZKXF.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-PEM4I7YB.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-PJEMMFQO.js");await t(n,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-5UQ36N7Q.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-DKPHJONC.js");await t(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-2APCW2N7.js");await t(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-UVS4UIJF.js");await t(n,{port:a,verbose:s});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-MN6RXRJO.js");await t(n,{port:a,verbose:s});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-6D6V6LRX.js");await t(n,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-FHQD42JV.js");await t(n,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-5NADXMRL.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-A4ML6QTW.js"),i=e(n,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-7VDRDQXQ.js");await m(n,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-7VDRDQXQ.js");await t(n,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-7VDRDQXQ.js");await t(n,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-7VDRDQXQ.js");await t(n,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-WVL2Y7UU.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-MUCGW2TT.js");await t(n,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-IC7P6QWF.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-ON6434HQ.js");await t(o.commandArgs,{port:a,device:d,driver:H});break}case"login":{let{runLogin:t}=await import("./chunks/login-NWY5ENAT.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-6BHGSVMN.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-GHNFMMK4.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-4OT37H4C.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-TXI7Q6F6.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-QKH2JQGE.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-6BT3VL2C.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-LADTO7OS.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-TH7B22C4.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-LLWAHSVR.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-KZIO3ZJH.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-2C3YGABQ.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-A6FDAXGU.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-4SFE3DNP.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-BCXD55HW.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-FUN6M66H.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-LDL3FZKD.js");await t(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:t}=await import("./chunks/hints-23C3BW62.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.44 | (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-B4B6RECG.js";import"./chunk-VQKQSSUD.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.46 | (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-YZ7BSNJJ.js";import"./chunk-W52DGZNV.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as M}from"./chunk-VQKQSSUD.js";import"./chunk-4ZA3J2BV.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as M}from"./chunk-W52DGZNV.js";import"./chunk-GWOV6KFE.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-4ZA3J2BV.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-GWOV6KFE.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-X7P3CGPY.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-XT36ZR2H.js";import"./chunk-GWOV6KFE.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,2 +1,2 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (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,4 +1,4 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function t(_){return`(async () => {
3
3
  const __t = window.__sootsimTest
4
4
  if (!__t) throw new Error('__sootsimTest not available')
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as d}from"./chunk-OBIALIWI.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as m}from"fs";import{tmpdir as w}from"os";import{dirname as v,join as p}from"path";var y=new Map;function i(e,r){y.set(e,r)}var a=1;function s(){return p(w(),`sootsim-cli-hints-${d()}.json`)}function l(){return p(w(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:a,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==a||!r?.shown?{version:a,shown:{}}:r}catch{return{version:a,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as d}from"./chunk-WWEMLI77.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as m}from"fs";import{tmpdir as w}from"os";import{dirname as v,join as p}from"path";var y=new Map;function i(e,r){y.set(e,r)}var a=1;function s(){return p(w(),`sootsim-cli-hints-${d()}.json`)}function l(){return p(w(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:a,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==a||!r?.shown?{version:a,shown:{}}:r}catch{return{version:a,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
3
3
  `)}catch{}}function F(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,r){let o=F();if(o==="off")return!1;if(o==="always"||r==="always")return!0;let n=Date.now();if(r==="once-per-identity"){let t=u(s());return t.shown[e]?!1:(t.shown[e]=n,f(s(),t),!0)}if(r==="once-ever"){let t=u(l());return t.shown[e]?!1:(t.shown[e]=n,f(l(),t),!0)}if(typeof r=="object"&&"cooldownMs"in r){let t=u(s()),c=t.shown[e]??0;return n-c<r.cooldownMs?!1:(t.shown[e]=n,f(s(),t),!0)}return!0}function M(e,...r){let o=y.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,o.frequency))return!1;let n=o.render(...r);if(n==null)return!1;let t=Array.isArray(n)?n:[n],c=o.stream==="error"?console.error:console.log;for(let g of t)c(` hint: ${g}`);return!0}function O(){m(s(),{force:!0})}function k(){m(l(),{force:!0})}function T(){return Array.from(y.entries()).map(([e,r])=>({id:e,frequency:r.frequency}))}i("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});i("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});i("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(r=>` ${r}`)]:null,stream:"error"});i("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});i("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});export{M as a,O as b,k as c,T as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,c as v,e as A}from"./chunk-OBIALIWI.js";import{E as k,F as T}from"./chunk-7PUVSCSF.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,c as v,e as A}from"./chunk-WWEMLI77.js";import{E as k,F as T}from"./chunk-M5HZVUQQ.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
3
3
  `)}return o.on("message",n=>{let r;try{r=JSON.parse(n.toString())}catch{return}if(r.id===0)return;let d=c.get(r.id);d&&(c.delete(r.id),r.i>0&&!p&&(p=!0,process.stderr.write(`
4
4
  \u26A0 ${r.i} other CLI identity/identities are driving this sim
5
5
  taps, scrolls, and keyboard input from multiple agents will collide on
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as c,b as p}from"./chunk-2Q5YKX76.js";import{a as m,c as h}from"./chunk-NMFN4EIE.js";import{a as l,b as u,c as d}from"./chunk-ECIHLBNE.js";function L(){let e=l();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=l();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await d(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var f={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:L,launch:O};function k(){let e=c();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function x(e){let r=c();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await p(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:k,launch:x};import{spawn as I}from"child_process";import{closeSync as R,mkdtempSync as A,openSync as $,readFileSync as _,rmSync as U}from"fs";import{createRequire as T}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var E=`
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as p}from"./chunk-XU27QCRX.js";import{a as m,c as h}from"./chunk-XKNZR4BB.js";import{a as l,b as u,c as d}from"./chunk-4OPZYTVB.js";function L(){let e=l();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=l();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await d(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var f={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:L,launch:O};function k(){let e=c();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function x(e){let r=c();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await p(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:k,launch:x};import{spawn as I}from"child_process";import{closeSync as R,mkdtempSync as $,openSync as A,readFileSync as _}from"fs";import{createRequire as U}from"module";import{tmpdir as g}from"os";import{join as w}from"path";var T=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -52,5 +52,5 @@ const userDataDir = process.env.SOOTSIM_PW_USERDATADIR || '';
52
52
  process.stderr.write(String((err && err.stack) || err) + '\\n');
53
53
  process.exit(1);
54
54
  });
55
- `;function w(){let e=[process.cwd()+"/"];try{process.argv[1]&&e.push(process.argv[1])}catch{}for(let r of e)try{let t=T(r);for(let i of["playwright","playwright-chromium","playwright-core"])try{return{spec:i,modulePath:t.resolve(i)}}catch{}}catch{}return null}function W(){let e=w();return e?{available:!0,reason:null,detail:`resolved via ${e.spec}`}:{available:!1,reason:"playwright not installed in the current workspace"}}function C(e){return e.profileId?m(h(e.profileId).id):e.ephemeralProfile?A(y(g(),"sootsim-playwright-profile-")):""}async function M(e){let r=w();if(!r)return{launched:!1,message:"playwright not installed \u2014 run `bun add -D playwright` first"};if(!e.url)return{launched:!1,message:"playwright driver requires a target url"};let t=y(g(),`sootsim-playwright-host-${Date.now().toString(36)}-${process.pid}.log`),i=$(t,"a");try{let a=I(process.execPath,["-e",E],{detached:!0,stdio:["ignore","ignore",i],env:{...process.env,SOOTSIM_PW_MODULE:r.modulePath,SOOTSIM_PW_URL:e.url,SOOTSIM_PW_HEADLESS:e.headless??!0?"1":"0",SOOTSIM_PW_USERDATADIR:C(e)}});a.unref();let o=await new Promise(n=>{let S=setTimeout(()=>n(null),4e3);a.once("exit",P=>{clearTimeout(S),n(P??0)})});if(o!==null&&o!==0){let n=_(t,"utf8").trim();return U(t,{force:!0}),{launched:!1,message:`playwright host exited early (code ${o})${n?`: ${n.split(`
56
- `).slice(-3).join(" ")}`:""}`}}return{launched:!0,message:`playwright chromium launched \u2192 ${e.url}`,pid:a.pid,target:r.spec,attachUrl:e.url}}catch(a){return{launched:!1,message:`playwright launch failed: ${a instanceof Error?a.message:String(a)}`}}finally{R(i)}}var D={id:"playwright",name:"playwright",description:"programmatic chromium via the playwright package \u2014 headless default",kind:"automation",availability:W,launch:M};function q(){return process.platform!=="darwin"&&process.platform!=="linux"&&process.platform!=="win32"?{available:!1,reason:`unsupported platform: ${process.platform}`}:{available:!0,reason:null,detail:process.platform==="darwin"?"open(1)":process.platform==="win32"?"cmd /c start":"xdg-open(1)"}}async function H(e){if(e.headless)return{launched:!1,message:"system driver does not support --headless; use chromium or playwright"};if(!e.url)return{launched:!1,message:"system driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current browser profile"};try{let r=await u(e.url,{detached:e.detached??!0,newWindow:e.newWindow});return{launched:!0,message:`${r.via} launch \u2192 ${e.url}`,pid:r.pid,target:r.target,attachUrl:e.url}}catch(r){return{launched:!1,message:`system launch failed: ${r instanceof Error?r.message:String(r)}`}}}var b={id:"system",name:"system",description:"shared browser launcher \u2014 system default or chromium window",kind:"delegate",availability:q,launch:H};var s=[f,v,D,b];function ae(){return s}function ne(e){return s.find(r=>r.id===e)??null}function se(e,r){if(e)return s.find(i=>i.id===e)??null;for(let t of r){let i=s.find(a=>a.id===t);if(i&&i.availability().available)return i}return null}function oe(){return s.map(e=>{let r=e.availability();return{id:e.id,name:e.name,kind:e.kind,description:e.description,available:r.available,reason:r.reason,detail:r.detail??null}})}export{f as a,v as b,D as c,b as d,s as e,ae as f,ne as g,se as h,oe as i};
55
+ `;function y(){let e=[process.cwd()+"/"];try{process.argv[1]&&e.push(process.argv[1])}catch{}for(let r of e)try{let t=U(r);for(let i of["playwright","playwright-chromium","playwright-core"])try{return{spec:i,modulePath:t.resolve(i)}}catch{}}catch{}return null}function E(){let e=y();return e?{available:!0,reason:null,detail:`resolved via ${e.spec}`}:{available:!1,reason:"playwright not installed in the current workspace"}}function W(e){return e.profileId?m(h(e.profileId).id):e.ephemeralProfile?$(w(g(),"sootsim-playwright-profile-")):""}async function C(e){let r=y();if(!r)return{launched:!1,message:"playwright not installed \u2014 run `bun add -D playwright` first"};if(!e.url)return{launched:!1,message:"playwright driver requires a target url"};let t=w(g(),`sootsim-playwright-host-${Date.now().toString(36)}-${process.pid}.log`),i=A(t,"a");try{let a=I(process.execPath,["-e",T],{detached:!0,stdio:["ignore","ignore",i],env:{...process.env,SOOTSIM_PW_MODULE:r.modulePath,SOOTSIM_PW_URL:e.url,SOOTSIM_PW_HEADLESS:e.headless??!0?"1":"0",SOOTSIM_PW_USERDATADIR:W(e)}});a.unref();let o=await new Promise(n=>{let S=setTimeout(()=>n(null),4e3);a.once("exit",P=>{clearTimeout(S),n(P??0)})});if(o!==null&&o!==0){let n=_(t,"utf8").trim();return{launched:!1,message:`playwright host exited early (code ${o}) \u2014 host log ${t}${n?`:
56
+ ${n}`:""}`}}return{launched:!0,message:`playwright chromium launched \u2192 ${e.url}`,pid:a.pid,target:r.spec,attachUrl:e.url}}catch(a){return{launched:!1,message:`playwright launch failed: ${a instanceof Error?a.message:String(a)}`}}finally{R(i)}}var D={id:"playwright",name:"playwright",description:"programmatic chromium via the playwright package \u2014 headless default",kind:"automation",availability:E,launch:C};function M(){return process.platform!=="darwin"&&process.platform!=="linux"&&process.platform!=="win32"?{available:!1,reason:`unsupported platform: ${process.platform}`}:{available:!0,reason:null,detail:process.platform==="darwin"?"open(1)":process.platform==="win32"?"cmd /c start":"xdg-open(1)"}}async function q(e){if(e.headless)return{launched:!1,message:"system driver does not support --headless; use chromium or playwright"};if(!e.url)return{launched:!1,message:"system driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current browser profile"};try{let r=await u(e.url,{detached:e.detached??!0,newWindow:e.newWindow});return{launched:!0,message:`${r.via} launch \u2192 ${e.url}`,pid:r.pid,target:r.target,attachUrl:e.url}}catch(r){return{launched:!1,message:`system launch failed: ${r instanceof Error?r.message:String(r)}`}}}var b={id:"system",name:"system",description:"shared browser launcher \u2014 system default or chromium window",kind:"delegate",availability:M,launch:q};var s=[f,v,D,b];function ie(){return s}function ae(e){return s.find(r=>r.id===e)??null}function ne(e,r){if(e)return s.find(i=>i.id===e)??null;for(let t of r){let i=s.find(a=>a.id===t);if(i&&i.availability().available)return i}return null}function se(){return s.map(e=>{let r=e.availability();return{id:e.id,name:e.name,kind:e.kind,description:e.description,available:r.available,reason:r.reason,detail:r.detail??null}})}export{f as a,v as b,D as c,b as d,s as e,ie as f,ae as g,ne as h,se as i};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u}from"./chunk-RN5LEOFJ.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u}from"./chunk-QXJR74QV.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,2 +1,2 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
3
3
  ${o}
4
4
  `);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-LCUVF6MI.js";import{l as s}from"./chunk-7PUVSCSF.js";import{chmodSync as c,existsSync as a,mkdirSync as l,readFileSync as d,rmSync as p,writeFileSync as h}from"node:fs";import{dirname as g,join as f,resolve as k}from"node:path";function i(){return f(s(),"credentials.json")}function _(){let t=i();if(!a(t))return null;try{let e=JSON.parse(d(t,"utf8"));return e.version!==1||typeof e.apiKey!="string"||!e.apiKey.startsWith("sk_sootsim_")?null:e.apiKey}catch{return null}}function T(t){if(!t.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let e=i();l(g(k(e)),{recursive:!0}),h(e,JSON.stringify({version:1,apiKey:t,savedAt:new Date().toISOString()},null,2)+`
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-WRNSX5RR.js";import{l as s}from"./chunk-M5HZVUQQ.js";import{chmodSync as c,existsSync as a,mkdirSync as l,readFileSync as d,rmSync as p,writeFileSync as h}from"node:fs";import{dirname as g,join as f,resolve as k}from"node:path";function i(){return f(s(),"credentials.json")}function _(){let t=i();if(!a(t))return null;try{let e=JSON.parse(d(t,"utf8"));return e.version!==1||typeof e.apiKey!="string"||!e.apiKey.startsWith("sk_sootsim_")?null:e.apiKey}catch{return null}}function T(t){if(!t.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let e=i();l(g(k(e)),{recursive:!0}),h(e,JSON.stringify({version:1,apiKey:t,savedAt:new Date().toISOString()},null,2)+`
3
3
  `);try{c(e,384)}catch{}}function K(){p(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function y(t){return!!(t&&t.length>=20&&t.length<=256&&m.some(e=>t.startsWith(e)))}function S(){let t=process.env.SOOT_INSTALLATION_TOKEN?.trim(),e=process.env.GITHUB_TOKEN?.trim(),r=t||e;if(!y(r))return null;let n=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!n)return null;let u=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:n,installationId:u||null,source:t?"soot-runner":"github-actions"}}function b(){let t=process.env.SOOTSIM_API_KEY?.trim();if(t&&t.startsWith("sk_sootsim_"))return{kind:"api-key",secret:t,source:"env"};let e=S();if(e)return e;let r=_();if(r)return{kind:"api-key",secret:r,source:"file"};let n=o();return n?.token?{kind:"session",token:n.token,origin:n.origin}:null}function E(t){return t.kind==="api-key"?`Bearer ${t.secret}`:`Bearer ${t.token}`}export{_ as a,T as b,K as c,b as d,E as e};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.46 | (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,2 +1,2 @@
1
- /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-RN5LEOFJ.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.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-QXJR74QV.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};