sootsim 0.1.38 → 0.1.40

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 (139) hide show
  1. package/dist-cli/bin.js +16 -15
  2. package/dist-cli/chunks/{agent-CGQWOOOL.js → agent-3F5PO4NL.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-M6P53GJ2.js → agent-wrapper-LVUUZRWL.js} +2 -2
  4. package/dist-cli/chunks/{assert-O7N2SYJZ.js → assert-4WMVS3WU.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-Q4A3PTF5.js +2 -0
  6. package/dist-cli/chunks/beta-CLLKUB5X.js +2 -0
  7. package/dist-cli/chunks/{chunk-PFRPXFSL.js → chunk-4IAKB3C4.js} +6 -6
  8. package/dist-cli/chunks/chunk-4L45Q3YX.js +5 -0
  9. package/dist-cli/chunks/{chunk-BEY2QVU5.js → chunk-553OZX4H.js} +2 -2
  10. package/dist-cli/chunks/{chunk-IKVIHHWE.js → chunk-5GK4YX7O.js} +1 -1
  11. package/dist-cli/chunks/{runtime-GFWS3QLZ.js → chunk-5IAIIX7B.js} +3 -3
  12. package/dist-cli/chunks/{chunk-NSZBULGG.js → chunk-6X5NQJT7.js} +3 -3
  13. package/dist-cli/chunks/{chunk-H6CG42HE.js → chunk-6XI4VHIL.js} +2 -2
  14. package/dist-cli/chunks/{chunk-HNAGYNWN.js → chunk-BZED27B2.js} +2 -2
  15. package/dist-cli/chunks/{chunk-JJVZMGRM.js → chunk-CAJ247SC.js} +2 -2
  16. package/dist-cli/chunks/{chunk-E473YTRQ.js → chunk-CCZHRBXJ.js} +1 -1
  17. package/dist-cli/chunks/{chunk-FXY5FWVY.js → chunk-D2ZMP7G4.js} +2 -2
  18. package/dist-cli/chunks/{chunk-CHMHTTI7.js → chunk-D4Z7MWQY.js} +2 -2
  19. package/dist-cli/chunks/{chunk-VIEK76DX.js → chunk-DEBXVPIE.js} +1 -1
  20. package/dist-cli/chunks/{chunk-FCOCFEBU.js → chunk-DHJIXXWG.js} +2 -2
  21. package/dist-cli/chunks/chunk-DPZDTJVQ.js +1 -0
  22. package/dist-cli/chunks/{chunk-IE2WYVJF.js → chunk-DSTHAISO.js} +1 -1
  23. package/dist-cli/chunks/{chunk-G23GIRBM.js → chunk-EOWN4ZFJ.js} +1 -1
  24. package/dist-cli/chunks/chunk-FFR7EA4U.js +1 -0
  25. package/dist-cli/chunks/chunk-FNIL6BYS.js +108 -0
  26. package/dist-cli/chunks/chunk-I7KXFJDK.js +1 -0
  27. package/dist-cli/chunks/{chunk-B4VH67D3.js → chunk-J6BPROH4.js} +1 -1
  28. package/dist-cli/chunks/{chunk-LNRBXCUI.js → chunk-KGVH3YAG.js} +2 -2
  29. package/dist-cli/chunks/{chunk-MTPWS4JK.js → chunk-KVOMVYG6.js} +4 -4
  30. package/dist-cli/chunks/{chunk-VVUEWU2P.js → chunk-LCES5ZJI.js} +2 -2
  31. package/dist-cli/chunks/{chunk-ARH3T5NK.js → chunk-LXR5EI74.js} +2 -2
  32. package/dist-cli/chunks/{chunk-P722XCFT.js → chunk-MLCBIX7O.js} +2 -2
  33. package/dist-cli/chunks/{chunk-P32FCOS3.js → chunk-OV5TY7M3.js} +2 -2
  34. package/dist-cli/chunks/chunk-PKB6IEGM.js +2 -0
  35. package/dist-cli/chunks/chunk-PNGBWMQH.js +17 -0
  36. package/dist-cli/chunks/{chunk-SKNHJDYO.js → chunk-QMBYRPRK.js} +1 -1
  37. package/dist-cli/chunks/{chunk-UD5ILFN5.js → chunk-QUULF2II.js} +2 -2
  38. package/dist-cli/chunks/chunk-S4PJMUC7.js +2 -0
  39. package/dist-cli/chunks/{chunk-5XI3AB4I.js → chunk-TK2IPNHL.js} +2 -2
  40. package/dist-cli/chunks/chunk-U3JD6X75.js +4 -0
  41. package/dist-cli/chunks/{chunk-67K3WAEZ.js → chunk-W2XRHDQQ.js} +2 -2
  42. package/dist-cli/chunks/{chunk-T442FYM5.js → chunk-WPS3TIOB.js} +1 -1
  43. package/dist-cli/chunks/{chunk-Z2PBRNJP.js → chunk-WQXG4I5N.js} +2 -2
  44. package/dist-cli/chunks/{chunk-QI4VLQ3A.js → chunk-WZE6T3GT.js} +1 -1
  45. package/dist-cli/chunks/chunk-XWXFUFB2.js +1 -0
  46. package/dist-cli/chunks/{chunk-ZEVZN3S4.js → chunk-Y5CFIRLN.js} +2 -2
  47. package/dist-cli/chunks/{chunk-2ABGQIW7.js → chunk-Y66CDFAT.js} +1 -1
  48. package/dist-cli/chunks/chunk-YJMXGTP4.js +2 -0
  49. package/dist-cli/chunks/{chunk-6UJXRT7F.js → chunk-YKEBL6GE.js} +1 -1
  50. package/dist-cli/chunks/{chunk-5HNZO5AI.js → chunk-Z3I2I4IO.js} +3 -3
  51. package/dist-cli/chunks/{compat-DNQWSPFQ.js → compat-NBFWHK5S.js} +2 -2
  52. package/dist-cli/chunks/{config-ABR5BGUO.js → config-JEDQ3NHA.js} +2 -2
  53. package/dist-cli/chunks/control-IMWZVYC3.js +2 -0
  54. package/dist-cli/chunks/{cpu-profile-Y5YDH6X2.js → cpu-profile-MQPUSRHG.js} +2 -2
  55. package/dist-cli/chunks/{daemon-2Z4DAJT6.js → daemon-HOL7J3BI.js} +2 -2
  56. package/dist-cli/chunks/{debug-R36UPOJP.js → debug-LNVMIWD6.js} +20 -20
  57. package/dist-cli/chunks/demo-app-registry-4RFMJ4FM.js +2 -0
  58. package/dist-cli/chunks/{detox-FQJWEWLT.js → detox-EEZPH3DZ.js} +2 -2
  59. package/dist-cli/chunks/{device-SXKLDZEC.js → device-GVLYQI7X.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-M7RKNI2H.js → diagnose-JQ7DPTSL.js} +2 -2
  61. package/dist-cli/chunks/drivers-JUW6JBWH.js +2 -0
  62. package/dist-cli/chunks/{electron-YUAKGT4H.js → electron-UDV6K3IH.js} +3 -3
  63. package/dist-cli/chunks/flow-JOW23WNH.js +2 -0
  64. package/dist-cli/chunks/{hints-SDD7L3VS.js → hints-46PJLATZ.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-QMCX2227.js → home-paths-XD7AOYU7.js} +2 -2
  66. package/dist-cli/chunks/inspect-EDIKZ6O2.js +993 -0
  67. package/dist-cli/chunks/install-CCC3IF5S.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-EKMYRDQH.js → install-desktop-CX6ATQTR.js} +3 -3
  69. package/dist-cli/chunks/{keys-ODG3TDUP.js → keys-CXQIYEVW.js} +2 -2
  70. package/dist-cli/chunks/{launch-7HUL745I.js → launch-DCFRKVD3.js} +3 -3
  71. package/dist-cli/chunks/{login-BJKQMJYT.js → login-HCIZL5GT.js} +4 -4
  72. package/dist-cli/chunks/{logout-7NG3KGJD.js → logout-7X2YHJY3.js} +2 -2
  73. package/dist-cli/chunks/{maestro-VFEUWV3Q.js → maestro-TY622MIW.js} +2 -2
  74. package/dist-cli/chunks/{preview-WZ6XNOBC.js → preview-DYI6ESOK.js} +2 -2
  75. package/dist-cli/chunks/{profile-DXFEZOHB.js → profile-7SXJEJTG.js} +2 -2
  76. package/dist-cli/chunks/{react-QP7PL5CZ.js → react-VGSDY766.js} +2 -2
  77. package/dist-cli/chunks/{record-AFE25EMH.js → record-7JX2SMVP.js} +2 -2
  78. package/dist-cli/chunks/runtime-FTOQD7QK.js +2 -0
  79. package/dist-cli/chunks/runtime-delivery-PWLODFCY.js +2 -0
  80. package/dist-cli/chunks/{screenshot-U6VFOVFW.js → screenshot-PTKY4UU4.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-HNGV3AFC.js → screenshot-mode-HSV7VY4G.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-GYMRDUJR.js → screenshots-VY7VAGSV.js} +2 -2
  83. package/dist-cli/chunks/server-EDB3EK4K.js +35 -0
  84. package/dist-cli/chunks/setup-repo-S2GFZR7F.js +2 -0
  85. package/dist-cli/chunks/{skills-FT76ZVAV.js → skills-KEPQLCMR.js} +2 -2
  86. package/dist-cli/chunks/start-5CJTBNRM.js +23 -0
  87. package/dist-cli/chunks/store-SCRULNVS.js +2 -0
  88. package/dist-cli/chunks/telemetry-RC3OT67I.js +2 -0
  89. package/dist-cli/chunks/{test-AJPY2Q6W.js → test-REKHGKFE.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-JZZVOMTG.js → three-mode-FZYHB4ZQ.js} +2 -2
  91. package/dist-cli/chunks/{timeline-GTSCF5P6.js → timeline-CWZAY52K.js} +2 -2
  92. package/dist-cli/chunks/upgrade-AIUJEF5F.js +4 -0
  93. package/dist-cli/chunks/upload-UDA5ITTE.js +2 -0
  94. package/dist-cli/chunks/what-happened-JSQQVQGE.js +15 -0
  95. package/dist-cli/chunks/{whoami-FOIMN6UC.js → whoami-5WUUPIRN.js} +2 -2
  96. package/dist-lib/agent-daemon-client.cjs +1 -1
  97. package/dist-lib/agent-events.cjs +1 -1
  98. package/dist-lib/agent-sessions.cjs +1 -1
  99. package/dist-lib/attached-projects.cjs +1 -1
  100. package/dist-lib/auth/shared-session.cjs +1 -1
  101. package/dist-lib/backend-origin.cjs +1 -1
  102. package/dist-lib/bridge-constants.cjs +1 -1
  103. package/dist-lib/cli-constants.cjs +1 -1
  104. package/dist-lib/config.cjs +1 -1
  105. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  106. package/dist-lib/home-paths.cjs +1 -1
  107. package/dist-lib/host/bridge-host.cjs +121 -83
  108. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  109. package/dist-lib/index.cjs +1 -1
  110. package/dist-lib/metro.cjs +1 -1
  111. package/dist-lib/profiles.cjs +1 -1
  112. package/dist-lib/render-mode.cjs +1 -1
  113. package/dist-lib/vite-base.cjs +147 -90
  114. package/dist-lib/vite.cjs +1 -1
  115. package/package.json +1 -1
  116. package/dist-cli/chunks/auto-bootstrap-DF4KYGPS.js +0 -2
  117. package/dist-cli/chunks/beta-AK25X3AU.js +0 -2
  118. package/dist-cli/chunks/chunk-23YMXBQ2.js +0 -1
  119. package/dist-cli/chunks/chunk-CB4PUMI2.js +0 -1
  120. package/dist-cli/chunks/chunk-FRE5TY3C.js +0 -1
  121. package/dist-cli/chunks/chunk-FX3PPKSJ.js +0 -2
  122. package/dist-cli/chunks/chunk-G62Q2MQI.js +0 -1
  123. package/dist-cli/chunks/chunk-GWQUPWVO.js +0 -2
  124. package/dist-cli/chunks/chunk-NKYTISAN.js +0 -4
  125. package/dist-cli/chunks/chunk-QD22CQLH.js +0 -5
  126. package/dist-cli/chunks/chunk-TR554AIH.js +0 -17
  127. package/dist-cli/chunks/control-DEHRU4XZ.js +0 -2
  128. package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +0 -2
  129. package/dist-cli/chunks/drivers-NSCX5CRA.js +0 -2
  130. package/dist-cli/chunks/flow-UQSRNEZD.js +0 -2
  131. package/dist-cli/chunks/inspect-6FPPW7GS.js +0 -1101
  132. package/dist-cli/chunks/install-TTH3PM3B.js +0 -2
  133. package/dist-cli/chunks/server-3Q22YYM6.js +0 -35
  134. package/dist-cli/chunks/setup-repo-NNDWIGZR.js +0 -2
  135. package/dist-cli/chunks/start-N573LFCF.js +0 -23
  136. package/dist-cli/chunks/store-6NTDGLPH.js +0 -2
  137. package/dist-cli/chunks/telemetry-SNZBIRGL.js +0 -2
  138. package/dist-cli/chunks/upload-UHTVCGGR.js +0 -2
  139. package/dist-cli/chunks/what-happened-N3AQ6I7O.js +0 -15
package/dist-cli/bin.js CHANGED
@@ -1,30 +1,31 @@
1
1
  #!/usr/bin/env node
2
- /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
- import{a as b,b as A,c as k,d as _,e as u,f as E}from"./chunks/chunk-PFRPXFSL.js";import{a as l}from"./chunks/chunk-Z2PBRNJP.js";import{a as p}from"./chunks/chunk-FX3PPKSJ.js";import{a as S,d as v}from"./chunks/chunk-IKVIHHWE.js";import"./chunks/chunk-ZEVZN3S4.js";import"./chunks/chunk-23YMXBQ2.js";import"./chunks/chunk-VIEK76DX.js";function g(){let e=A({bridgePort:7668,defaultShellUrl:p},l()),t=`
4
- ${v}
5
- `;console.log(`${t}${e}
2
+ /*! sootsim v0.1.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
+ import{a as E}from"./chunks/chunk-YJMXGTP4.js";import{a as l}from"./chunks/chunk-WQXG4I5N.js";import{a as A,b as k,c as S,d as C,e as u,f as T}from"./chunks/chunk-4IAKB3C4.js";import{a as p}from"./chunks/chunk-S4PJMUC7.js";import{a as v,d as _}from"./chunks/chunk-5GK4YX7O.js";import"./chunks/chunk-Y5CFIRLN.js";import"./chunks/chunk-XWXFUFB2.js";import{z as L}from"./chunks/chunk-YKEBL6GE.js";import"./chunks/chunk-DEBXVPIE.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
+ ${_}
5
+ `;console.log(`${R()}
6
+ ${e}${t}
6
7
 
7
8
  auth:
8
9
  sootsim login sign in for desktop uploads
9
10
  sootsim logout clear the shared desktop session
10
11
  sootsim whoami show the current shared desktop account
11
- `)}function T(e){let t=b(e,{bridgePort:7668,defaultShellUrl:p},l());return t?(console.log(`${t}
12
- `),!0):!1}function h(e){if(e==="3d-mode"){h("three-mode");return}if(e==="login"){console.log(`sootsim login
12
+ `)}function O(t){let e=A(t,{bridgePort:7668,defaultShellUrl:p},l());return e?(console.log(`${e}
13
+ `),!0):!1}function h(t){if(t==="3d-mode"){h("three-mode");return}if(t==="login"){console.log(`sootsim login
13
14
 
14
15
  sign in for desktop uploads using the shared desktop session.
15
16
  opens the browser and stores the resulting bearer token for both the CLI and electron.
16
- `);return}if(e==="logout"){console.log(`sootsim logout
17
+ `);return}if(t==="logout"){console.log(`sootsim logout
17
18
 
18
19
  clear the shared desktop session used by the CLI and electron.
19
- `);return}if(e==="whoami"){console.log(`sootsim whoami
20
+ `);return}if(t==="whoami"){console.log(`sootsim whoami
20
21
 
21
22
  show the current shared desktop account used by the CLI and electron.
22
- `);return}let t=k(e,{bridgePort:7668,defaultShellUrl:p});if(!t){console.log(`unknown command: ${e}`);return}console.log(`${t}
23
- `)}function C(e){let t=e instanceof Error?e.message:String(e);(/^command timed out after \d+s$/.test(t)||t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("no sim connected with id ")||t.startsWith("sootsim bridge daemon is not running")||t.startsWith("refusing to install the persistent sootsim daemon"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${t}
24
- `),process.exit(1)),e instanceof Error&&e.stack?process.stderr.write(`${e.stack}
25
- `):process.stderr.write(`${t}
26
- `),process.exit(1)}process.on("unhandledRejection",C);process.on("uncaughtException",C);var y=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,$=new Set(["preview","electron","install-desktop"]);function D(e){!y||!$.has(e)||(process.stderr.write(` sootsim ${e} isn't available in the standalone binary \u2014
23
+ `);return}let e=S(t,{bridgePort:7668,defaultShellUrl:p});if(!e){console.log(`unknown command: ${t}`);return}console.log(`${e}
24
+ `)}function x(t){let e=t instanceof Error?t.message:String(t);(/^command timed out after \d+s$/.test(e)||e.startsWith("sim disconnected:")||e.startsWith("bridge never reconnected")||e.startsWith("no sim connected with id ")||e.startsWith("sootsim bridge daemon is not running")||e.startsWith("refusing to install the persistent sootsim daemon"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${e}
25
+ `),process.exit(1)),t instanceof Error&&t.stack?process.stderr.write(`${t.stack}
26
+ `):process.stderr.write(`${e}
27
+ `),process.exit(1)}process.on("unhandledRejection",x);process.on("uncaughtException",x);var M=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,P=new Set(["preview","electron","install-desktop"]);function F(t){!M||!P.has(t)||(process.stderr.write(` sootsim ${t} isn't available in the standalone binary \u2014
27
28
  it needs vite / electron / playwright from a project's node_modules.
28
29
  install the npm package and run via bun or node instead:
29
- npm i -g sootsim && sootsim ${e}
30
- `),process.exit(1))}var o=E(process.argv);{let{trackCliEvent:e}=await import("./chunks/telemetry-SNZBIRGL.js");e({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(e){let{flushCliTelemetry:t}=await import("./chunks/telemetry-SNZBIRGL.js");await t(),process.exit(e)}if(o.version){let{readFileSync:e}=await import("fs"),{fileURLToPath:t}=await import("url"),i=t(import.meta.resolve("sootsim/package.json")),m=JSON.parse(e(i,"utf8")),{IS_BETA:O,BETA_LABEL:x}=await import("./chunks/beta-AK25X3AU.js"),I=O?` \xB7 ${x}`:"";console.log(`sootsim v${m.version}${I}`),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,N=o.globalFlags.driver,G=o.globalFlags.headless===!0,L=o.globalFlags.sim,r=L?["--sim",L,...o.commandArgs]:o.commandArgs;if(d||f){let{settingsStore:e}=await import("./chunks/store-6NTDGLPH.js"),t={};d&&(t.deviceModel=d),f&&(t.colorScheme=f),e.apply(t)}if(!o.command&&o.commandArgs.length===0){let{runStart:e}=await import("./chunks/start-N573LFCF.js");await e([],{port:a}),await c(0)}var n=o.command??"";n||(g(),await c(o.commandArgs.length>0?1:0));if(n in u){let e=u[n],t=o.commandArgs.length>0?` ${o.commandArgs.join(" ")}`:"";console.error(` \`sootsim ${n}\` was removed. use \`${e}\` instead.`),t&&console.error(` \u2192 ${e}${t}`),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 e=n==="do"||n==="get"||n==="debug"||n==="shell"||n==="wait",t=o.commandArgs.find(i=>!i.startsWith("-"));n==="shell"||(e&&!t?T(n)&&await c(0):(h(e&&t?t:n),await c(0)))}D(n);if(_.has(n)){let{ensureSootsimReady:e,resolveBootstrapPort:t}=await import("./chunks/auto-bootstrap-DF4KYGPS.js"),i=t(r,a);await e(i);let{runInspect:m}=await import("./chunks/inspect-6FPPW7GS.js");await m([n,...r],{port:i,verbose:s})}else switch(n){case"assert":{let{runAssert:e}=await import("./chunks/assert-O7N2SYJZ.js");await e(o.commandArgs);break}case"flow":{let{runFlow:e}=await import("./chunks/flow-UQSRNEZD.js"),t=await e(r);process.exit(typeof t=="number"?t:0)}case"test":{let{runTest:e}=await import("./chunks/test-AJPY2Q6W.js");await e(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:e}=await import("./chunks/detox-FQJWEWLT.js");await e(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:e}=await import("./chunks/maestro-VFEUWV3Q.js"),t=await e(o.commandArgs,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"preview":{let{runPreview:e}=await import("./chunks/preview-WZ6XNOBC.js");await e(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:e}=await import("./chunks/record-AFE25EMH.js");await e(r,{port:a,verbose:s});break}case"profile":{let{runProfile:e}=await import("./chunks/profile-DXFEZOHB.js"),t=await e(o.commandArgs,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"cpu-profile":{let{runCpuProfile:e}=await import("./chunks/cpu-profile-Y5YDH6X2.js"),t=await e(r,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"react":{let{runReact:e}=await import("./chunks/react-QP7PL5CZ.js"),t=await e(r,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshot:e}=await import("./chunks/screenshot-U6VFOVFW.js");await e(r,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:e}=await import("./chunks/screenshots-GYMRDUJR.js"),t=await e(r,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"screenshot-mode":{let{runScreenshotMode:e}=await import("./chunks/screenshot-mode-HNGV3AFC.js");await e(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:e}=await import("./chunks/three-mode-JZZVOMTG.js");await e(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:e}=await import("./chunks/inspect-6FPPW7GS.js");await e(r,{port:a,verbose:s});break}case"debug":{let{runDebug:e}=await import("./chunks/debug-R36UPOJP.js");await e(r,{port:a,verbose:s});break}case"timeline":{let{runTimeline:e}=await import("./chunks/timeline-GTSCF5P6.js");await e(r,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:e}=await import("./chunks/what-happened-N3AQ6I7O.js");await e(r,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:e}=await import("./chunks/diagnose-M7RKNI2H.js"),t=await e(r,{port:a,verbose:s});process.exit(typeof t=="number"?t:0)}case"open":{let{ensureSootsimReady:e,resolveBootstrapPort:t}=await import("./chunks/auto-bootstrap-DF4KYGPS.js"),i=t(r,a);await e(i);let{runOpenCommand:m}=await import("./chunks/control-DEHRU4XZ.js");await m(r,{port:i});break}case"use":case"focus":{let{runUseCommand:e}=await import("./chunks/control-DEHRU4XZ.js");await e(r,{port:a});break}case"claim":{let{runClaimCommand:e}=await import("./chunks/control-DEHRU4XZ.js");await e(r,{port:a});break}case"close":{let{runCloseCommand:e}=await import("./chunks/control-DEHRU4XZ.js");await e(r,{port:a});break}case"config":{let{runConfig:e}=await import("./chunks/config-ABR5BGUO.js");await e(o.commandArgs);break}case"device":{let{runDeviceCommand:e}=await import("./chunks/device-SXKLDZEC.js");await e(r,{port:a});break}case"scan":case"compat":{let{runCompat:e}=await import("./chunks/compat-DNQWSPFQ.js");await e(o.commandArgs);break}case"electron":{let{runElectron:e}=await import("./chunks/electron-YUAKGT4H.js");await e(o.commandArgs,{port:a,device:d,driver:N});break}case"login":{let{runLogin:e}=await import("./chunks/login-BJKQMJYT.js");await e(o.commandArgs);break}case"logout":{let{runLogout:e}=await import("./chunks/logout-7NG3KGJD.js");await e();break}case"whoami":{let{runWhoami:e}=await import("./chunks/whoami-FOIMN6UC.js");await e();break}case"keys":{let{runKeys:e}=await import("./chunks/keys-ODG3TDUP.js");await e(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:e}=await import("./chunks/setup-repo-NNDWIGZR.js");await e(o.commandArgs);break}case"install":{let{runInstall:e}=await import("./chunks/install-TTH3PM3B.js");await e(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:e}=await import("./chunks/install-desktop-EKMYRDQH.js");await e(o.commandArgs);break}case"server":{let{runServer:e}=await import("./chunks/server-3Q22YYM6.js");await e(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:e}=await import("./chunks/daemon-2Z4DAJT6.js");await e(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:e}=await import("./chunks/runtime-GFWS3QLZ.js");await e(o.commandArgs);break}case"launch":{let{runLaunch:e}=await import("./chunks/launch-7HUL745I.js");await e(o.commandArgs);break}case"start":{let{runStart:e}=await import("./chunks/start-N573LFCF.js");await e(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:e}=await import("./chunks/agent-CGQWOOOL.js"),t=await e(o.commandArgs);process.exit(t)}case"agent-wrapper":{let{runAgentWrapper:e}=await import("./chunks/agent-wrapper-M6P53GJ2.js"),t=await e(o.commandArgs);process.exit(t)}case"skills":{let{runSkills:e}=await import("./chunks/skills-FT76ZVAV.js");await e(o.commandArgs);break}case"upload":{let{runUpload:e}=await import("./chunks/upload-UHTVCGGR.js");await e(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:e}=await import("./chunks/hints-SDD7L3VS.js");e(o.commandArgs);break}default:console.error(` unknown command: ${n}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
30
+ npm i -g sootsim && sootsim ${t}
31
+ `),process.exit(1))}var o=T(process.argv);{let{trackCliEvent:t}=await import("./chunks/telemetry-RC3OT67I.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-RC3OT67I.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-CLLKUB5X.js"),D=I?` \xB7 ${y}`:"";console.log(`sootsim v${m.version}${D}`);let{readActiveRuntime:N}=await import("./chunks/home-paths-XD7AOYU7.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-SCRULNVS.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-5CJTBNRM.js");await t([],{port:a}),await c(0)}var r=o.command??"";r||(g(),await c(o.commandArgs.length>0?1: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-Q4A3PTF5.js"),i=e(n,a);await t(i);let{runInspect:m}=await import("./chunks/inspect-EDIKZ6O2.js");await m([r,...n],{port:i,verbose:s})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-4WMVS3WU.js");await t(o.commandArgs);break}case"flow":{let{runFlow:t}=await import("./chunks/flow-JOW23WNH.js"),e=await t(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:t}=await import("./chunks/test-REKHGKFE.js");await t(o.commandArgs,{port:a,verbose:s});break}case"detox":{let{runDetox:t}=await import("./chunks/detox-EEZPH3DZ.js");await t(o.commandArgs,{port:a,verbose:s});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-TY622MIW.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-DYI6ESOK.js");await t(o.commandArgs,{port:a,verbose:s});break}case"record":{let{runRecord:t}=await import("./chunks/record-7JX2SMVP.js");await t(n,{port:a,verbose:s});break}case"profile":{let{runProfile:t}=await import("./chunks/profile-7SXJEJTG.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-MQPUSRHG.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-VGSDY766.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-PTKY4UU4.js");await t(n,{port:a,verbose:s});break}case"screenshots":{let{runScreenshots:t}=await import("./chunks/screenshots-VY7VAGSV.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-HSV7VY4G.js");await t(o.commandArgs,{port:a,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:t}=await import("./chunks/three-mode-FZYHB4ZQ.js");await t(o.commandArgs,{port:a,verbose:s});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-EDIKZ6O2.js");await t(n,{port:a,verbose:s});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-LNVMIWD6.js");await t(n,{port:a,verbose:s});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-CWZAY52K.js");await t(n,{port:a,verbose:s});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-JSQQVQGE.js");await t(n,{port:a,verbose:s});break}case"diagnose":{let{runDiagnose:t}=await import("./chunks/diagnose-JQ7DPTSL.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-Q4A3PTF5.js"),i=e(n,a);await t(i);let{runOpenCommand:m}=await import("./chunks/control-IMWZVYC3.js");await m(n,{port:i});break}case"use":case"focus":{let{runUseCommand:t}=await import("./chunks/control-IMWZVYC3.js");await t(n,{port:a});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-IMWZVYC3.js");await t(n,{port:a});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-IMWZVYC3.js");await t(n,{port:a});break}case"config":{let{runConfig:t}=await import("./chunks/config-JEDQ3NHA.js");await t(o.commandArgs);break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-GVLYQI7X.js");await t(n,{port:a});break}case"scan":case"compat":{let{runCompat:t}=await import("./chunks/compat-NBFWHK5S.js");await t(o.commandArgs);break}case"electron":{let{runElectron:t}=await import("./chunks/electron-UDV6K3IH.js");await t(o.commandArgs,{port:a,device:d,driver:H});break}case"login":{let{runLogin:t}=await import("./chunks/login-HCIZL5GT.js");await t(o.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-7X2YHJY3.js");await t();break}case"whoami":{let{runWhoami:t}=await import("./chunks/whoami-5WUUPIRN.js");await t();break}case"keys":{let{runKeys:t}=await import("./chunks/keys-CXQIYEVW.js");await t(o.commandArgs);break}case"setup-repo":{let{runSetupRepo:t}=await import("./chunks/setup-repo-S2GFZR7F.js");await t(o.commandArgs);break}case"install":{let{runInstall:t}=await import("./chunks/install-CCC3IF5S.js");await t(o.commandArgs);break}case"install-desktop":{let{runInstallDesktop:t}=await import("./chunks/install-desktop-CX6ATQTR.js");await t(o.commandArgs);break}case"server":{let{runServer:t}=await import("./chunks/server-EDB3EK4K.js");await t(o.commandArgs,{port:a});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-HOL7J3BI.js");await t(o.commandArgs,{port:a});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-FTOQD7QK.js");await t(o.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-AIUJEF5F.js");await t(o.commandArgs);break}case"launch":{let{runLaunch:t}=await import("./chunks/launch-DCFRKVD3.js");await t(o.commandArgs);break}case"start":{let{runStart:t}=await import("./chunks/start-5CJTBNRM.js");await t(o.commandArgs,{port:a});break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-3F5PO4NL.js"),e=await t(o.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-LVUUZRWL.js"),e=await t(o.commandArgs);process.exit(e)}case"skills":{let{runSkills:t}=await import("./chunks/skills-KEPQLCMR.js");await t(o.commandArgs);break}case"upload":{let{runUpload:t}=await import("./chunks/upload-UDA5ITTE.js");await t(o.commandArgs,{port:a,verbose:s});break}case"hints":{let{runHints:t}=await import("./chunks/hints-46PJLATZ.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.38 | (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-P32FCOS3.js";import"./chunk-IE2WYVJF.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.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.40 | (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-OV5TY7M3.js";import"./chunk-DSTHAISO.js";import"./chunk-XWXFUFB2.js";import"./chunk-YKEBL6GE.js";import"./chunk-DEBXVPIE.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.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as M}from"./chunk-IE2WYVJF.js";import"./chunk-VIEK76DX.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.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as M}from"./chunk-DSTHAISO.js";import"./chunk-DEBXVPIE.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.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-VIEK76DX.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.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-DEBXVPIE.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.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-Z3I2I4IO.js";import"./chunk-PNGBWMQH.js";import"./chunk-Y66CDFAT.js";import"./chunk-XWXFUFB2.js";import"./chunk-YKEBL6GE.js";import"./chunk-DEBXVPIE.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-5GK4YX7O.js";import"./chunk-DEBXVPIE.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};