sootsim 0.1.293 → 0.1.295

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 (169) hide show
  1. package/detox/expectations.ts +4 -3
  2. package/detox/index.ts +2 -4
  3. package/dist-cli/bin.js +7 -5
  4. package/dist-cli/chunks/{agent-YWI2NWL7.js → agent-ASAYE5YY.js} +4 -2
  5. package/dist-cli/chunks/{agent-wrapper-IYJ7UZOA.js → agent-wrapper-K2D4Q5AA.js} +4 -2
  6. package/dist-cli/chunks/{app-fonts-FQFUC4LR.js → app-fonts-36N7AVQ3.js} +4 -2
  7. package/dist-cli/chunks/{assert-XUCELWAC.js → assert-4FKHHDY7.js} +4 -2
  8. package/dist-cli/chunks/{auth-4DQTV3OW.js → auth-BQPOPEFK.js} +4 -2
  9. package/dist-cli/chunks/beta-3LNYONDF.js +4 -0
  10. package/dist-cli/chunks/{camera-RYOHBVZA.js → camera-Y5MZ5V4L.js} +4 -2
  11. package/dist-cli/chunks/{chunk-YRFWATLA.js → chunk-2RI6RC6I.js} +4 -2
  12. package/dist-cli/chunks/{chunk-RV67J726.js → chunk-3WQISFAK.js} +3 -1
  13. package/dist-cli/chunks/{chunk-67CIS55C.js → chunk-4NJIXTVJ.js} +3 -1
  14. package/dist-cli/chunks/{chunk-UOHGYYSO.js → chunk-4ODQVUBH.js} +3 -1
  15. package/dist-cli/chunks/chunk-4V2KYK5T.js +4 -0
  16. package/dist-cli/chunks/chunk-6VF477QO.js +4 -0
  17. package/dist-cli/chunks/{chunk-2XYCSFGN.js → chunk-7FYIMLU4.js} +34 -32
  18. package/dist-cli/chunks/{chunk-WOWLO4LL.js → chunk-7GVBNEQ3.js} +3 -1
  19. package/dist-cli/chunks/{chunk-J6P2UPXH.js → chunk-7GZ6XF2B.js} +7 -5
  20. package/dist-cli/chunks/{chunk-VZ44FQDG.js → chunk-BX2NUJGR.js} +3 -1
  21. package/dist-cli/chunks/chunk-COEKUTWV.js +4 -0
  22. package/dist-cli/chunks/chunk-CVDC2ER2.js +10 -0
  23. package/dist-cli/chunks/{chunk-2VKTOZQ5.js → chunk-D2DU3ROC.js} +4 -2
  24. package/dist-cli/chunks/{chunk-DE4ZA3NL.js → chunk-DKS75M2I.js} +4 -2
  25. package/dist-cli/chunks/{chunk-WP3TFHFL.js → chunk-DXCQP3VE.js} +4 -2
  26. package/dist-cli/chunks/{chunk-6IFJLHDA.js → chunk-E6DZD6JD.js} +3 -1
  27. package/dist-cli/chunks/chunk-ETDZQUGI.js +5 -0
  28. package/dist-cli/chunks/{chunk-KC5SCOGS.js → chunk-FH7DQ2HB.js} +4 -2
  29. package/dist-cli/chunks/{chunk-LOQLZFRK.js → chunk-HT6WYHQL.js} +4 -2
  30. package/dist-cli/chunks/{chunk-LA5DIO33.js → chunk-I4QJVACX.js} +3 -1
  31. package/dist-cli/chunks/chunk-I7AWRAXM.js +125 -0
  32. package/dist-cli/chunks/{chunk-U3564F2Y.js → chunk-JPPGM6RZ.js} +4 -2
  33. package/dist-cli/chunks/chunk-K7LQB4IF.js +7 -0
  34. package/dist-cli/chunks/chunk-L7V46673.js +3 -0
  35. package/dist-cli/chunks/chunk-MEYVMDZR.js +74 -0
  36. package/dist-cli/chunks/chunk-OQ7SSRYK.js +4 -0
  37. package/dist-cli/chunks/{chunk-BQT5YDTV.js → chunk-QKZVANQG.js} +5 -3
  38. package/dist-cli/chunks/{chunk-E5WYXRGV.js → chunk-QPA44BZC.js} +28 -26
  39. package/dist-cli/chunks/{chunk-WPPMUUML.js → chunk-RNW36VM5.js} +4 -2
  40. package/dist-cli/chunks/{chunk-UPKYK52K.js → chunk-RV67EC7L.js} +4 -2
  41. package/dist-cli/chunks/{chunk-RKXHQ2Q3.js → chunk-S6BEA6OC.js} +18 -16
  42. package/dist-cli/chunks/chunk-SU5WQ4SQ.js +4 -0
  43. package/dist-cli/chunks/{chunk-7B6RGFTM.js → chunk-T2DHHOWE.js} +4 -2
  44. package/dist-cli/chunks/{chunk-4B4VFT73.js → chunk-TGYZYSDB.js} +7 -5
  45. package/dist-cli/chunks/{chunk-JOPKZVOW.js → chunk-TNKZWHD2.js} +3 -1
  46. package/dist-cli/chunks/chunk-TXURXDZN.js +4 -0
  47. package/dist-cli/chunks/{chunk-PCAPHXN3.js → chunk-U2QPKFOY.js} +4 -2
  48. package/dist-cli/chunks/{chunk-WVMYRKSS.js → chunk-UAZ3NVKO.js} +4 -2
  49. package/dist-cli/chunks/{chunk-B7TX4WFB.js → chunk-UBIGBHUM.js} +4 -2
  50. package/dist-cli/chunks/{chunk-547W23BB.js → chunk-UWFAWMPE.js} +4 -2
  51. package/dist-cli/chunks/{chunk-VO74GDXL.js → chunk-WFYQNZTT.js} +5 -3
  52. package/dist-cli/chunks/{chunk-NCCMRFXU.js → chunk-X5FTDIHQ.js} +3 -1
  53. package/dist-cli/chunks/{chunk-2M57EAWS.js → chunk-XCCDO6I2.js} +3 -1
  54. package/dist-cli/chunks/{chunk-RMLJXP7T.js → chunk-XQRUWC3F.js} +4 -2
  55. package/dist-cli/chunks/{chunk-TJS5IMOH.js → chunk-Y6FJ5FCY.js} +3 -1
  56. package/dist-cli/chunks/{chunk-WI36YJ23.js → chunk-ZJZYGLJ2.js} +3 -1
  57. package/dist-cli/chunks/{cleanup-BLFDJSFS.js → cleanup-SMCA44QC.js} +4 -2
  58. package/dist-cli/chunks/cli-version-I6BOBK57.js +4 -0
  59. package/dist-cli/chunks/{compat-Q3WCSTB7.js → compat-FCM2ZQLV.js} +5 -3
  60. package/dist-cli/chunks/{config-NHNMRRNB.js → config-PZSANSAI.js} +4 -2
  61. package/dist-cli/chunks/control-PM554MHE.js +4 -0
  62. package/dist-cli/chunks/daemon-5KXEZZLJ.js +4 -0
  63. package/dist-cli/chunks/{debug-PGRMZFXA.js → debug-VG2JOF6H.js} +5 -3
  64. package/dist-cli/chunks/{desktop-NVTQ37LH.js → desktop-GH2POW6X.js} +5 -3
  65. package/dist-cli/chunks/{detox-W3JDXS76.js → detox-X6T265L5.js} +4 -2
  66. package/dist-cli/chunks/{device-KQYN3EVK.js → device-VDOOSAXO.js} +4 -2
  67. package/dist-cli/chunks/{diagnose-CPUKSGNO.js → diagnose-6D6WNAGL.js} +4 -2
  68. package/dist-cli/chunks/disk-cleanup-HTOIDDKK.js +4 -0
  69. package/dist-cli/chunks/drivers-CKLBQDXG.js +4 -0
  70. package/dist-cli/chunks/{film-VZGAZ2YY.js → film-UZWYISAB.js} +11 -24
  71. package/dist-cli/chunks/flow-VOS3RKB3.js +4 -0
  72. package/dist-cli/chunks/help-LVMDERFQ.js +4 -0
  73. package/dist-cli/chunks/{hidden-runtime-alias-KWHABCNZ.js → hidden-runtime-alias-UGMJ4LJX.js} +4 -2
  74. package/dist-cli/chunks/{home-paths-O4CGYVHF.js → home-paths-3LYT47SY.js} +4 -2
  75. package/dist-cli/chunks/inspect-FHCSOWGQ.js +4 -0
  76. package/dist-cli/chunks/install-desktop-KLMCVDGZ.js +4 -0
  77. package/dist-cli/chunks/{login-KPN4Z26Q.js → login-K43TRKUC.js} +6 -4
  78. package/dist-cli/chunks/logout-L43CR6M2.js +4 -0
  79. package/dist-cli/chunks/{maestro-PYA4AHTS.js → maestro-7VZFYLNS.js} +13 -11
  80. package/dist-cli/chunks/{maestro-generate-KCMYWPWL.js → maestro-generate-PMYHUVH4.js} +5 -3
  81. package/dist-cli/chunks/{mode-AEB7G2SJ.js → mode-QQS5XFFX.js} +4 -2
  82. package/dist-cli/chunks/optional-demo-registry-2V327HDG.js +4 -0
  83. package/dist-cli/chunks/{perf-YLXGZI3E.js → perf-CL5P3JVP.js} +4 -2
  84. package/dist-cli/chunks/{permissions-7VMVZOUV.js → permissions-RGVCEC2B.js} +4 -2
  85. package/dist-cli/chunks/{record-AVQO45PE.js → record-ASW6UFQT.js} +5 -3
  86. package/dist-cli/chunks/runtime-GB3ZE27C.js +4 -0
  87. package/dist-cli/chunks/{screenshot-command-LACQLA4N.js → screenshot-command-FEJGQMQF.js} +5 -3
  88. package/dist-cli/chunks/{screenshots-capture-PROOBSGB.js → screenshots-capture-3JPZ5WMX.js} +4 -2
  89. package/dist-cli/chunks/{serve-FJN2FRGW.js → serve-SYXRHRQO.js} +4 -2
  90. package/dist-cli/chunks/{setup-IVV4NRYQ.js → setup-QLGL6MC6.js} +5 -3
  91. package/dist-cli/chunks/{skills-WYR3PJOH.js → skills-T6EEX5P6.js} +4 -2
  92. package/dist-cli/chunks/{storage-GM7K4MGM.js → storage-ZFUK4EQA.js} +4 -2
  93. package/dist-cli/chunks/store-WCDTSWJC.js +4 -0
  94. package/dist-cli/chunks/telemetry-D7SL4WW7.js +4 -0
  95. package/dist-cli/chunks/{timeline-R5UL3N4T.js → timeline-EIURYQVC.js} +4 -2
  96. package/dist-cli/chunks/{upgrade-RWHSFZRX.js → upgrade-Q7ZGWMCJ.js} +4 -2
  97. package/dist-cli/chunks/upload-7XEICYJX.js +4 -0
  98. package/dist-cli/chunks/{version-7K6TVQOW.js → version-PDG4V26R.js} +4 -2
  99. package/dist-cli/chunks/web-AMW2TRWB.js +4 -0
  100. package/dist-cli/chunks/{what-happened-K24TSJZX.js → what-happened-L5ZN7S5G.js} +4 -2
  101. package/dist-lib/agent-daemon-client.cjs +2 -1
  102. package/dist-lib/agent-events.cjs +1 -1
  103. package/dist-lib/agent-identity.cjs +3 -3
  104. package/dist-lib/agent-sessions.cjs +1 -1
  105. package/dist-lib/attached-projects.cjs +1 -1
  106. package/dist-lib/auth/shared-session.cjs +1 -1
  107. package/dist-lib/backend-origin.cjs +1 -1
  108. package/dist-lib/beta.cjs +1 -1
  109. package/dist-lib/beta.mjs +1 -1
  110. package/dist-lib/bridge-constants.cjs +4 -1
  111. package/dist-lib/cli-constants.cjs +1 -1
  112. package/dist-lib/config.cjs +1 -1
  113. package/dist-lib/detox/index.cjs +5 -4
  114. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  115. package/dist-lib/home-paths.cjs +1 -1
  116. package/dist-lib/host/bridge-host.cjs +4 -3
  117. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  118. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  119. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  120. package/dist-lib/host/websocket-proxy.cjs +1 -1
  121. package/dist-lib/index.cjs +4 -1
  122. package/dist-lib/jump-to-source-babel.cjs +1 -1
  123. package/dist-lib/menu.cjs +45 -4
  124. package/dist-lib/menu.mjs +42 -4
  125. package/dist-lib/metro.cjs +1 -1
  126. package/dist-lib/profiles.cjs +1 -1
  127. package/dist-lib/render-mode.cjs +1 -1
  128. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  129. package/dist-lib/sdk.cjs +5 -2
  130. package/dist-lib/sdk.mjs +4 -2
  131. package/dist-lib/skills.cjs +328 -183
  132. package/dist-lib/vite.cjs +2 -1
  133. package/package.json +6 -1
  134. package/scripts/postinstall.cjs +11 -2
  135. package/skills/contrast/SKILL.md +2 -2
  136. package/src/agent-identity.ts +2 -2
  137. package/src/bridge-constants.ts +1 -0
  138. package/src/index.ts +4 -1
  139. package/src/menu.ts +53 -4
  140. package/src/vite-plugin.ts +102 -2
  141. package/dist-cli/chunks/beta-CFDAW6UN.js +0 -2
  142. package/dist-cli/chunks/chunk-3UX6AY2B.js +0 -2
  143. package/dist-cli/chunks/chunk-6VVLDYPV.js +0 -8
  144. package/dist-cli/chunks/chunk-7H34H74K.js +0 -72
  145. package/dist-cli/chunks/chunk-7H5G4HUK.js +0 -2
  146. package/dist-cli/chunks/chunk-ACSTEPSD.js +0 -2
  147. package/dist-cli/chunks/chunk-AFRXWKTA.js +0 -118
  148. package/dist-cli/chunks/chunk-HKMWUN7F.js +0 -2
  149. package/dist-cli/chunks/chunk-K5JEUI5G.js +0 -5
  150. package/dist-cli/chunks/chunk-MOU2WLO4.js +0 -2
  151. package/dist-cli/chunks/chunk-QXDXUDJD.js +0 -1
  152. package/dist-cli/chunks/chunk-USJTVC7T.js +0 -2
  153. package/dist-cli/chunks/chunk-YNG4C3ZS.js +0 -2
  154. package/dist-cli/chunks/cli-version-TQHZOK4L.js +0 -2
  155. package/dist-cli/chunks/control-I7YBDRJT.js +0 -2
  156. package/dist-cli/chunks/daemon-4R3SZLZY.js +0 -2
  157. package/dist-cli/chunks/disk-cleanup-2COWZWBC.js +0 -2
  158. package/dist-cli/chunks/drivers-RRZM6E72.js +0 -2
  159. package/dist-cli/chunks/flow-VH6DFDQ4.js +0 -2
  160. package/dist-cli/chunks/help-3HQ2RINO.js +0 -2
  161. package/dist-cli/chunks/inspect-PKMJGXDH.js +0 -2
  162. package/dist-cli/chunks/install-desktop-K5TP3ZHJ.js +0 -2
  163. package/dist-cli/chunks/logout-E3UCJAMC.js +0 -2
  164. package/dist-cli/chunks/optional-demo-registry-AIWOBAAA.js +0 -2
  165. package/dist-cli/chunks/runtime-HOGETVVD.js +0 -2
  166. package/dist-cli/chunks/store-YLVHPKG7.js +0 -2
  167. package/dist-cli/chunks/telemetry-MQKB6PFX.js +0 -2
  168. package/dist-cli/chunks/upload-RBH4XGJ2.js +0 -2
  169. package/dist-cli/chunks/web-46ZPQCAL.js +0 -2
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-VZ44FQDG.js";import{o as T}from"./chunk-WOWLO4LL.js";import{a as D}from"./chunk-RV67J726.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import f from"node:fs";import h from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||T()}function y(){return _()}function B(){return h.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=B(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=B();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function U(e){return q("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ye(e){let t=h.resolve(e.cwd),r=U(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function Se(){return S().attachedProjects}var Q=336*60*60*1e3;function we(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-Q,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function ve(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function Ae(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function V(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=V(t.agentSessions[c],s,r))}})}function v(e,t){z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-AIWOBAAA.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=U(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as Z,spawnSync as ee}from"node:child_process";import{randomUUID as te}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import re from"node:readline";function b(e){return u.join(y(),"sessions",e)}function W(e){return u.join(b(e),"prompt.in")}function J(e){return u.join(b(e),"events.out")}function ne(e){return u.join(y(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function se(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=oe();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function oe(){try{let e=ie();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ie(){try{let r=D.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=ce();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ce(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ae(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!de(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function de(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=ee("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Re(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ae(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?te():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=W(s.id),d=J(s.id),a=ne(s.id);L(c),L(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=se(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=Z(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});x.unref();let E=e.readyTimeoutMs??6e3,j=await ue(d,p=>p.type==="ready"||p.type==="error",E);if(!j||j.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function Ne(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as R}from"./chunk-BX2NUJGR.js";import{o as T}from"./chunk-7GVBNEQ3.js";import{a as D}from"./chunk-3WQISFAK.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import f from"node:fs";import h from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||T()}function y(){return _()}function B(){return h.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=B(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=B();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function U(e){return q("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ye(e){let t=h.resolve(e.cwd),r=U(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function Se(){return S().attachedProjects}var Q=336*60*60*1e3;function we(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-Q,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function ve(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function Ae(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function V(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=V(t.agentSessions[c],s,r))}})}function v(e,t){z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-2V327HDG.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=U(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as Z,spawnSync as ee}from"node:child_process";import{randomUUID as te}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import re from"node:readline";function b(e){return u.join(y(),"sessions",e)}function W(e){return u.join(b(e),"prompt.in")}function J(e){return u.join(b(e),"events.out")}function ne(e){return u.join(y(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function se(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=oe();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function oe(){try{let e=ie();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ie(){try{let r=D.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=ce();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ce(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ae(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!de(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function de(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=ee("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Re(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ae(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?te():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=W(s.id),d=J(s.id),a=ne(s.id);L(c),L(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=se(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=Z(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});x.unref();let E=e.readyTimeoutMs??6e3,j=await ue(d,p=>p.type==="ready"||p.type==="error",E);if(!j||j.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function Ne(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
3
5
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function $e(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(O(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=b(e),n=y();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function _e(e,t){let r=J(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,m.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=re.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let a=I(d);a&&t(a)});let c=!1;return()=>{if(!c){c=!0;try{i.writeSync(n,`
4
6
  `)}catch{}try{s.close()}catch{}try{o.destroy()}catch{}}}}async function ue(e,t,r){let n=i.openSync(e,m.O_RDWR|m.O_NONBLOCK),o=Buffer.alloc(8192),s="",c=Date.now()+r;try{for(;Date.now()<c;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(a){if(a.code!=="EAGAIN")throw a;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let a;for(;(a=s.indexOf(`
5
7
  `))>=0;){let g=s.slice(0,a);s=s.slice(a+1);let A=I(g);if(A&&t(A))return A}}else await new Promise(a=>setTimeout(a,30))}return null}finally{i.closeSync(n)}}export{I as a,y as b,ye as c,F as d,Se as e,we as f,ve as g,Ae as h,k as i,C as j,V as k,z as l,Pe as m,b as n,W as o,J as p,ne as q,O as r,se as s,l as t,Re as u,Ne as v,$e as w,_e as x};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{H as F,m as B,n as A,o as h,t as E,v as P}from"./chunk-RKXHQ2Q3.js";import{h as y,l as N,m as I}from"./chunk-J6P2UPXH.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{I as F,m as B,n as A,p as h,u as E,w as P}from"./chunk-S6BEA6OC.js";import{i as y,m as N,n as I}from"./chunk-7GZ6XF2B.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
5
  `)}function Q(e){process.stderr.write(`${e}
4
6
  `)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function O(e,t,...r){return N(e,`__sootsimTest.${t}`,...r)}async function j(e,t,...r){return I(e,`SootSim.bridges.mainShell.${t}`,...r)}async function X(e,t={}){try{let r=await O(e,"waitForScreenTransitions",k);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function Z(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await j(e,t,...n)}catch(o){if(!F(o)||Date.now()>=s)throw o;await w(50)}}async function ee(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let i=0;i<s;i++){let u=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function te(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let i=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await i.send({type:"evaluate",code:"1"}),i}catch{i.close()}await w(o)}return null}async function ne(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,i=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,liveFrameActive:!1,liveFrameChannels:0,liveFramePublishes:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let a=await e.send({type:"evaluate",code:B}),g=Date.now()-o,f=Number(a?.nodes)||0,$=Number(a?.targets)||0,C=a?.liveFrameActive===!0,W=Number(a?.liveFrameChannels)||0,q=Number(a?.liveFramePublishes)||0,x=Number(a?.errors)||0,T=a?.flag===!0,p=a?.externalReady,M=typeof a?.loadingText=="string"?a.loadingText.trim():"",D=typeof a?.externalStatus=="string"?a.externalStatus.trim():"",R=typeof a?.externalError=="string"?a.externalError.trim():"",v=typeof a?.externalError=="string"&&R.length>0;if(c=p,d=v,f!==i&&(i=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,liveFrameActive:C,liveFrameChannels:W,liveFramePublishes:q,flag:a?.flag,loadingText:M,externalReady:typeof p=="boolean"?p:null,externalStatus:D,externalError:R,errors:x},T&&p!==!1&&!v&&!M&&h({liveFrameActive:C,nodes:f,targets:$})&&g-u>=A)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!T)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&h(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function H(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function L(e,t={}){let r=await e.send({type:"evaluate",code:P});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
5
7
  console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await E(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
@@ -1,3 +1,5 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{o as d}from"./chunk-WOWLO4LL.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{o as d}from"./chunk-7GVBNEQ3.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
5
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?b({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{O as a,b,l as c,E as d};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as k}from"./chunk-LA5DIO33.js";import{a as x}from"./chunk-UOHGYYSO.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://contrast.dev/api/electron-release";function O(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=r==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:r,dest:o,onProgress:e}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${r})`);y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(n=>n?p(n):l())})}}function _(r,o){let e=(r/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as k}from"./chunk-I4QJVACX.js";import{a as x}from"./chunk-4ODQVUBH.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://contrast.dev/api/electron-release";function O(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=r==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:r,dest:o,onProgress:e}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${r})`);y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(n=>n?p(n):l())})}}function _(r,o){let e=(r/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
3
5
  `),t=e[e.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=b(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),n=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return n.status!==0&&console.warn(` warning: failed to unmount ${t} (${n.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(r){let o=b(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(r,e),D(r),S(e,493),e}async function B(r){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),r}async function q(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
6
  sootsim desktop install \u2014 download and install the optional desktop GUI
5
7
 
@@ -20,4 +22,4 @@ examples:
20
22
  `),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=r.includes("--force"),s=k();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await x("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
23
  `);try{await I({url:t.url,dest:i,onProgress:(n,m)=>{let $=Date.now();$-d<100&&n<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(n,m)}`))}})}catch(n){g(a,{recursive:!0,force:!0});let m=n instanceof Error?n.message:String(n);console.error(`
22
24
  download failed: ${m}`),console.error(` the ${t.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. check your connection and try again later;"),console.error(" the CLI + daemon work without the desktop app (run: sootsim --help)."),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-MQKB6PFX.js");try{let n=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${n}`)}catch(n){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:n instanceof Error?n.message:String(n)}}),await p(),console.error(` install failed: ${n instanceof Error?n.message:String(n)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim desktop launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as a};
25
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-D7SL4WW7.js");try{let n=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${n}`)}catch(n){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:n instanceof Error?n.message:String(n)}}),await p(),console.error(` install failed: ${n instanceof Error?n.message:String(n)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim desktop launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as a};
@@ -1,2 +1,4 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
2
4
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
@@ -1,3 +1,5 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
2
4
  import{execFileSync as b,execSync as A}from"node:child_process";var p=new WeakMap,u=new Set,y=!1;function d(){return{platform:process.platform,env:process.env}}function g(e=d()){return e.platform==="linux"&&e.env.GITHUB_ACTIONS==="true"&&e.env.RUNNER_OS==="Linux"}function I(e){let r=String(e);return/^--disable-gpu(?:=.*)?$/i.test(r)||/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(r)||/^--use-angle=(?:swiftshader|swiftshader-webgl)$/i.test(r)||/^--use-gl=swiftshader$/i.test(r)}function E(e){return e.match(/(?:^|\s)(--disable-gpu(?:=[^\s]+)?|--enable-unsafe-swiftshader(?:=[^\s]+)?|--use-angle=(?:swiftshader|swiftshader-webgl)|--use-gl=swiftshader)(?=\s|$)/i)?.[1]??null}function v(e){return e==="darwin"?"metal":e==="linux"?"vulkan":"default"}function P(e,r=d()){if(g(r))return;let n=E(e);if(n)throw new Error(`[reap-browser] refused software-rendering Chrome process argument ${n}`);let o=v(r.platform),s=e.split(/\s+/);if(!s.includes(`--use-angle=${o}`)||!s.includes("--enable-gpu"))throw new Error(`[reap-browser] Chrome process did not retain the required ${o} GPU arguments`);if(r.platform==="darwin"&&e.includes("/Applications/Google Chrome.app/"))throw new Error("[reap-browser] refused the user's installed Google Chrome; use Playwright channel chromium")}function G(e){if(!e||typeof e!="object")return[];let n=e.gpu;if(!n||typeof n!="object")return[];let o=n,s=[],a=o.auxAttributes;if(a&&typeof a=="object")for(let t of Object.values(a))typeof t=="string"&&s.push(t);let i=o.devices;if(Array.isArray(i)){for(let t of i)if(!(!t||typeof t!="object"))for(let c of Object.values(t))typeof c=="string"&&s.push(c)}return s}function C(e){if(!e||typeof e!="object")return null;let r=e;if(!Array.isArray(r.processInfo))return null;for(let n of r.processInfo){if(!n||typeof n!="object")continue;let o=n;if(o.type==="browser"&&typeof o.id=="number"&&Number.isInteger(o.id)&&o.id>0)return o.id}return null}function L(e,r=d()){if(g(r))return;let o=G(e).join(" | ");if(!o||/swiftshader|llvmpipe|software rasterizer/i.test(o))throw new Error(`[reap-browser] Chrome reported a software renderer${o?`: ${o}`:""}`);if(r.platform==="darwin"&&!/metal/i.test(o))throw new Error(`[reap-browser] Chrome did not report an ANGLE Metal renderer: ${o}`)}function w(e){if(e&&typeof e=="object"){let n=p.get(e);if(n!==void 0)return n}let r=e;if(r&&typeof r.process=="function")try{let n=r.process();if(n&&typeof n.pid=="number"&&n.pid>0)return n.pid}catch{}if(r&&typeof r.browser=="function")try{let n=r.browser();if(n)return w(n)}catch{}return null}function h(e){let r=[];try{r=A(`pgrep -P ${e} || true`).toString().split(`
3
5
  `).filter(Boolean)}catch{}for(let n of r)h(Number(n));try{process.kill(e,"SIGKILL")}catch{}}function f(e){let r=e;if(!r||typeof r!="object")return null;if(typeof r.newBrowserCDPSession=="function"||typeof r.process=="function")return r;if(typeof r.browser!="function")return null;try{let n=r.browser();return n?f(n):null}catch{return null}}function m(e,r,n){e&&typeof e=="object"&&p.set(e,n),p.set(r,n),u.add(n),B()}async function N(e){let r=w(e);if(r!==null)return r;let n=f(e);if(!n||typeof n.newBrowserCDPSession!="function")return null;let o=await n.newBrowserCDPSession();try{let s=C(await o.send("SystemInfo.getProcessInfo"));return s===null?null:(m(e,n,s),s)}finally{await o.detach?.()}}async function j(e){let r=w(e);if(r!==null){u.delete(r),h(r);return}let n=e;if(n&&typeof n.close=="function")try{await n.close()}catch{}}async function T(e,r,n){if(g(r))return;let o=w(e),s=f(e);if(o!==null&&s&&m(e,s,o),o!==null&&(r.platform==="darwin"||r.platform==="linux")){let t=b("ps",["-p",String(o),"-o","command="],{encoding:"utf8"}).trim();P(t,r)}let a=n?await n(e):e,i=f(a);if(i&&typeof i.newBrowserCDPSession=="function"){let t=await i.newBrowserCDPSession();try{let c=C(await t.send("SystemInfo.getProcessInfo"));if(c===null)throw new Error("[reap-browser] Chrome did not report its browser process id");if(m(e,i,c),a&&typeof a=="object"&&p.set(a,c),r.platform==="darwin"||r.platform==="linux"){let l=b("ps",["-p",String(c),"-o","command="],{encoding:"utf8"}).trim();P(l,r)}L(await t.send("SystemInfo.getInfo"),r);return}finally{await t.detach?.()}}throw new Error("[reap-browser] could not validate the launched Chrome GPU renderer")}var $=!1;function B(){if(y)return;y=!0;let e=()=>{for(let r of u)h(r)};$||(process.on("SIGTERM",()=>{e(),process.exit(0)}),process.on("SIGINT",()=>{e(),process.exit(0)})),process.on("exit",e)}async function R(e){let r=await e(),n=w(r);if(n===null)try{n=await N(r)}catch{n=null}let o=new Set;n!=null&&(o.add(n),u.add(n),B());let s=f(r)??r;if(typeof s.on=="function"){let i=typeof s.newBrowserCDPSession=="function"?"disconnected":"close";s.on(i,()=>{for(let t of o)u.delete(t);o.clear()})}return{browser:r,reapNow:()=>{for(let i of o)h(i),u.delete(i);o.clear()}}}async function D(e){let{browser:r}=await R(e);return r}var k=!1;function W(e=process.platform){return[`--use-angle=${v(e)}`,"--enable-gpu","--enable-gpu-rasterization","--enable-zero-copy","--ignore-gpu-blocklist"]}function O(e={},r=d()){let n=Array.isArray(e.args)?e.args:[],o=n.find(I);if(o!==void 0)throw new Error(`[reap-browser] refused software-rendering Chrome launch argument ${String(o)}`);if(e.executablePath!==void 0)throw new Error("[reap-browser] executablePath bypasses Playwright Chrome for Testing and is not allowed");if(e.ignoreDefaultArgs===!0)throw new Error("[reap-browser] ignoreDefaultArgs=true bypasses required Chrome launch defaults");let s=new Set(["--enable-gpu","--enable-gpu-rasterization","--enable-zero-copy","--ignore-gpu-blocklist"]),a=n.filter(c=>{let l=String(c);return!s.has(l)&&!l.startsWith("--use-angle=")}),i=Array.isArray(e.ignoreDefaultArgs)?e.ignoreDefaultArgs:[],t=[...new Set([...i,"--disable-gpu","--enable-unsafe-swiftshader"])];return{...e,channel:"chromium",args:[...a,...W(r.platform)],ignoreDefaultArgs:t}}function x(e,r,n){return async()=>{let o=d(),s=g(o),a=O(r,o);if(!k){let i;try{i=await e(a)}catch(t){let c=t instanceof Error?t.message:String(t);if(!/not found at|not installed|Chromium distribution|Executable doesn't exist|No such file/i.test(c))throw t;if(!s)throw new Error("[reap-browser] Playwright Chrome for Testing is required for local GPU browser work; chromium_headless_shell fallback is disabled. Run `bunx playwright install chromium`.",{cause:t});return k=!0,console.warn("[reap-browser] GitHub Actions Linux Chrome for Testing not found, falling back to chromium_headless_shell software rendering."),e(S(r))}try{await T(i,o,n)}catch(t){throw await j(i),t}return i}return e(S(r))}}function S(e){let r={...e};return delete r.channel,delete r.executablePath,r}async function z(e,r={},n){return D(x(e,r,n))}async function U(e,r={},n){return R(x(e,r,n))}export{z as a,U as b};
@@ -1,3 +1,5 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{k as n}from"./chunk-YNG4C3ZS.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{k as n}from"./chunk-ETDZQUGI.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
5
  `)}export{g as a};
@@ -1,2 +1,4 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
2
4
  var a=["Cache","Code Cache","DawnCache","DawnGraphiteCache","DawnWebGPUCache","GPUCache","GrShaderCache","ShaderCache"],r=new Set(a);function s(e){return r.has(e)}export{a,s as b};
@@ -1,2 +1,4 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
2
4
  var m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},p=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),b=new Set(["do","get","wait","shell","debug"]),d=new Set(["detox","maestro","record","film","storage","permissions","perf","screenshot","mode","inspect","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","version","skill","config","cleanup","app-fonts","agent-wrapper","agent",...p]);function h(c){let r=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<r.length;){let o=r[s];if(o==="--"){e.commandArgs.push(...r.slice(s+1));break}let i=Object.entries(m).find(([l,n])=>l===o||n.short===o);if(i){let[l,n]=i,a=l.replace(/^--/,"");if(n.type==="boolean")e.globalFlags[a]=!0,s++;else{let t=r[s+1];if(t===void 0||t.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(n.type==="number"){let g=Number(t);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${t}"`),s+=2;continue}e.globalFlags[a]=g}else e.globalFlags[a]=t;s+=2}continue}if(!e.command&&!o.startsWith("-")){let l=o.indexOf("-");if(l>0){let n=o.slice(0,l),a=o.slice(l+1);if(b.has(n)&&a.length>0){e.command=n;let t=r.slice(s+1);e.commandArgs=[a,...t[0]==="--"?t.slice(1):t];break}}if(d.has(o)){e.command=o;let n=r.slice(s+1);e.commandArgs=n[0]==="--"?n.slice(1):n;break}e.commandArgs=r.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{p as a,h as b};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,c as g,d as f,e as v}from"./chunk-LOQLZFRK.js";import"./chunk-2VKTOZQ5.js";import"./chunk-TJS5IMOH.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(i){let r=new Map;for(let t of i){let n=r.get(t.kind)??{bytes:0,count:0};n.bytes+=t.bytes,n.count++,r.set(t.kind,n)}return[...r].sort((t,n)=>n[1].bytes-t[1].bytes).map(([t,n])=>` ${b[t]}: ${s(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{b as s,c as g,d as f,e as v}from"./chunk-HT6WYHQL.js";import"./chunk-D2DU3ROC.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(i){let r=new Map;for(let t of i){let n=r.get(t.kind)??{bytes:0,count:0};n.bytes+=t.bytes,n.count++,r.set(t.kind,n)}return[...r].sort((t,n)=>n[1].bytes-t[1].bytes).map(([t,n])=>` ${b[t]}: ${s(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
3
5
  sootsim cleanup \u2014 inspect and reclaim local SootSim disk usage
4
6
 
5
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-X5FTDIHQ.js";import"./chunk-3WQISFAK.js";export{a as getCliVersion};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-RV67J726.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-3WQISFAK.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
5
  sootsim compat \u2014 check package compatibility
4
6
 
5
7
  usage:
@@ -20,7 +22,7 @@ examples:
20
22
  sootsim compat react-native-reanimated
21
23
  sootsim compat --json
22
24
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-46ZPQCAL.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-46ZPQCAL.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
25
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-AMW2TRWB.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-AMW2TRWB.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
26
  sootsim compatibility report
25
27
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
28
 
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as i,C as s,x as t}from"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{A as i,C as s,x as t}from"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
3
5
  sootsim config \u2014 manage local CLI preferences
4
6
 
5
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-TGYZYSDB.js";import"./chunk-DXCQP3VE.js";import"./chunk-4NJIXTVJ.js";import"./chunk-UBIGBHUM.js";import"./chunk-T2DHHOWE.js";import"./chunk-I4QJVACX.js";import"./chunk-S6BEA6OC.js";import"./chunk-OQ7SSRYK.js";import"./chunk-TXURXDZN.js";import"./chunk-TNKZWHD2.js";import"./chunk-4V2KYK5T.js";import"./chunk-E6DZD6JD.js";import"./chunk-7GZ6XF2B.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f}from"./chunk-MEYVMDZR.js";import"./chunk-COEKUTWV.js";import"./chunk-UWFAWMPE.js";import"./chunk-CVDC2ER2.js";import"./chunk-RV67EC7L.js";import"./chunk-FH7DQ2HB.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-I7AWRAXM.js";import"./chunk-7GVBNEQ3.js";import"./chunk-X5FTDIHQ.js";import"./chunk-SU5WQ4SQ.js";import"./chunk-3WQISFAK.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-B7TX4WFB.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-RKXHQ2Q3.js";import{g as D,i as O,k as x}from"./chunk-J6P2UPXH.js";import"./chunk-3UX6AY2B.js";import"./chunk-K5JEUI5G.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{f,m as T}from"./chunk-UBIGBHUM.js";import{L as S,M as $,N,O as A,P as v}from"./chunk-S6BEA6OC.js";import{h as D,j as O,l as x}from"./chunk-7GZ6XF2B.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
5
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
6
 
5
7
  usage:
@@ -170,7 +172,7 @@ examples:
170
172
  } : null,
171
173
  samples,
172
174
  }
173
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-PKMJGXDH.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
175
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-FHCSOWGQ.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
174
176
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
175
177
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
176
178
  if (!d) return null;
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-VO74GDXL.js";import"./chunk-QXDXUDJD.js";import{a as v,h as k}from"./chunk-4B4VFT73.js";import"./chunk-WP3TFHFL.js";import"./chunk-67CIS55C.js";import"./chunk-B7TX4WFB.js";import{b as m,g as f,l as h}from"./chunk-7B6RGFTM.js";import{a as c}from"./chunk-LA5DIO33.js";import"./chunk-RKXHQ2Q3.js";import"./chunk-ACSTEPSD.js";import"./chunk-MOU2WLO4.js";import"./chunk-JOPKZVOW.js";import"./chunk-HKMWUN7F.js";import"./chunk-6IFJLHDA.js";import{a as u}from"./chunk-UOHGYYSO.js";import"./chunk-J6P2UPXH.js";import"./chunk-TJS5IMOH.js";import"./chunk-RMLJXP7T.js";import"./chunk-YNG4C3ZS.js";import"./chunk-3UX6AY2B.js";import"./chunk-K5JEUI5G.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as g}from"./chunk-WFYQNZTT.js";import"./chunk-L7V46673.js";import{a as v,h as k}from"./chunk-TGYZYSDB.js";import"./chunk-DXCQP3VE.js";import"./chunk-4NJIXTVJ.js";import"./chunk-UBIGBHUM.js";import{b as m,g as f,l as h}from"./chunk-T2DHHOWE.js";import{a as c}from"./chunk-I4QJVACX.js";import"./chunk-S6BEA6OC.js";import"./chunk-OQ7SSRYK.js";import"./chunk-TXURXDZN.js";import"./chunk-TNKZWHD2.js";import"./chunk-4V2KYK5T.js";import"./chunk-E6DZD6JD.js";import{a as u}from"./chunk-4ODQVUBH.js";import"./chunk-7GZ6XF2B.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
5
  sootsim desktop \u2014 launch the desktop companion
4
6
 
5
7
  usage:
@@ -16,7 +18,7 @@ examples:
16
18
  sootsim desktop --port 5173
17
19
  sootsim desktop --profile qa
18
20
  sootsim desktop --driver system
19
- `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-K5TP3ZHJ.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
21
+ `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-KLMCVDGZ.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
20
22
  sootsim desktop \u2014 launch or install the desktop companion
21
23
 
22
24
  usage:
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{e as $}from"./chunk-E5WYXRGV.js";import"./chunk-YRFWATLA.js";import"./chunk-2M57EAWS.js";import"./chunk-2XYCSFGN.js";import"./chunk-U3564F2Y.js";import{c as F,d as M,e as E}from"./chunk-WPPMUUML.js";import{a as P}from"./chunk-DE4ZA3NL.js";import"./chunk-4B4VFT73.js";import"./chunk-WP3TFHFL.js";import"./chunk-67CIS55C.js";import"./chunk-B7TX4WFB.js";import"./chunk-7B6RGFTM.js";import"./chunk-LA5DIO33.js";import"./chunk-RKXHQ2Q3.js";import"./chunk-ACSTEPSD.js";import"./chunk-MOU2WLO4.js";import"./chunk-JOPKZVOW.js";import"./chunk-HKMWUN7F.js";import"./chunk-6IFJLHDA.js";import"./chunk-J6P2UPXH.js";import"./chunk-WI36YJ23.js";import"./chunk-7H5G4HUK.js";import"./chunk-547W23BB.js";import"./chunk-TJS5IMOH.js";import"./chunk-KC5SCOGS.js";import"./chunk-RMLJXP7T.js";import"./chunk-YNG4C3ZS.js";import"./chunk-3UX6AY2B.js";import"./chunk-K5JEUI5G.js";import"./chunk-AFRXWKTA.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{e as $}from"./chunk-QPA44BZC.js";import"./chunk-2RI6RC6I.js";import"./chunk-XCCDO6I2.js";import"./chunk-7FYIMLU4.js";import"./chunk-JPPGM6RZ.js";import{c as F,d as M,e as E}from"./chunk-RNW36VM5.js";import{a as P}from"./chunk-DKS75M2I.js";import"./chunk-TGYZYSDB.js";import"./chunk-DXCQP3VE.js";import"./chunk-4NJIXTVJ.js";import"./chunk-UBIGBHUM.js";import"./chunk-T2DHHOWE.js";import"./chunk-I4QJVACX.js";import"./chunk-S6BEA6OC.js";import"./chunk-OQ7SSRYK.js";import"./chunk-TXURXDZN.js";import"./chunk-TNKZWHD2.js";import"./chunk-4V2KYK5T.js";import"./chunk-E6DZD6JD.js";import"./chunk-7GZ6XF2B.js";import"./chunk-ZJZYGLJ2.js";import"./chunk-COEKUTWV.js";import"./chunk-UWFAWMPE.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-FH7DQ2HB.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-I7AWRAXM.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
3
5
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
6
 
5
7
  usage:
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-67CIS55C.js";import"./chunk-HKMWUN7F.js";import{g as d,i as l,l as a}from"./chunk-J6P2UPXH.js";import"./chunk-RMLJXP7T.js";import{b as c,c as r,d as g}from"./chunk-YNG4C3ZS.js";import"./chunk-3UX6AY2B.js";import"./chunk-K5JEUI5G.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";function h(){console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-4NJIXTVJ.js";import"./chunk-4V2KYK5T.js";import{h as d,j as l,m as a}from"./chunk-7GZ6XF2B.js";import"./chunk-XQRUWC3F.js";import{b as c,c as r,d as g}from"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";function h(){console.log(`
3
5
  sootsim device \u2014 inspect or change the live device preset for a sim
4
6
 
5
7
  usage:
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as E,i as R,l as b}from"./chunk-J6P2UPXH.js";import"./chunk-3UX6AY2B.js";import{c as v}from"./chunk-K5JEUI5G.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{h as E,j as R,m as b}from"./chunk-7GZ6XF2B.js";import"./chunk-6VF477QO.js";import{c as v}from"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
3
5
  sootsim get diagnosis \u2014 compact "what just went wrong?" report
4
6
 
5
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e}from"./chunk-HT6WYHQL.js";import"./chunk-D2DU3ROC.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-L7V46673.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-T2DHHOWE.js";import"./chunk-I4QJVACX.js";import"./chunk-TNKZWHD2.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,5 +1,7 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as L,d as T}from"./chunk-PCAPHXN3.js";import{g as $,i as R,m as b}from"./chunk-J6P2UPXH.js";import"./chunk-3UX6AY2B.js";import"./chunk-K5JEUI5G.js";import"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as q}from"node:os";import{dirname as j,extname as H,join as K,resolve as C}from"node:path";var s=t=>new Promise(a=>setTimeout(a,t)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(t,a){let n=t.indexOf(a);return n>=0?t[n+1]:void 0}async function r(t,a,n=3e4){return await t.send({type:"evaluate",code:a},{timeoutMs:n})}async function le(t,a){if(t.length===0||t.includes("--help")||t.includes("-h"))return console.log(`
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c as L,d as T}from"./chunk-U2QPKFOY.js";import{h as A,j as R,n as b}from"./chunk-7GZ6XF2B.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
3
5
  sootsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
4
6
 
5
7
  usage:
@@ -32,25 +34,10 @@ examples:
32
34
  sootsim film flows/feed-scroll.yaml
33
35
  sootsim film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
34
36
  sootsim film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
35
- `),0;let n=t.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!n||!V(C(n)))return console.error(` film: flow file not found: ${n??"(none given)"}`),1;let P=Number.parseInt(c(t,"--fps")??"30",10),h=c(t,"--script")??"hero-arc",D=t.includes("--keep-three"),v=n.replace(/^.*\//,"").replace(/\.ya?ml$/,""),I=c(t,"--out"),l=C(I??K(q(),"Desktop","sootsim-films",`${v}.webm`)),y=H(l).toLowerCase()===".mp4";if(y&&x("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let z=$(t,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),e=R({...z,commandTimeoutMs:6e4});try{let d=await r(e,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
36
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(e,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let O=Date.now();await s(500);let{runFlowPlayback:G}=await import("./flow-VH6DFDQ4.js"),m=[n],S=c(t,"--sim");S&&m.push("--sim",S);let k=c(t,"--slow");k&&m.push("--slow",k);let f=await G(m);await s(400);let u=Math.min(Date.now()-O,Y);if(await r(e,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let _=!1;for(let o=0;o<50;o++){await s(400);let i=await r(e,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
37
- return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){_=!0;break}}if(!_)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(e,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await L(e),await s(1400),await r(e,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let F=!1;for(let o=0;o<60;o++)if(await s(250),await r(e,`(() => { const rs = window.SootSim?.replayStore
38
- return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){F=!0;break}if(!F)return console.error(" film: recording editor did not seed the replay store"),1;await r(e,`(async () => {
39
- const entitled = () =>
40
- window.__sootsimSharedAuth?.current?.entitlements?.threeModeAdvancedControls === true
41
- if (entitled()) return true
42
- const chip = Array.from(document.querySelectorAll('*')).find(
43
- (e) => e.childElementCount === 0 && e.textContent?.trim() === 'DevLogin',
44
- )
45
- if (!chip) return entitled()
46
- chip.click()
47
- const deadline = Date.now() + 20000
48
- while (Date.now() < deadline) {
49
- if (entitled()) return true
50
- await new Promise((r) => setTimeout(r, 300))
51
- }
52
- return entitled()
53
- })()`,3e4)||console.log(" film: decor entitlement not unlocked \u2014 stage uses the default look");let p=T(t);delete p.script,p.resetPose=!0,await b(e,"SootSim.bridges.threeMode.configure",p),await s(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(e,`(() => {
37
+ `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&x("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=A(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=R({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-VOS3RKB3.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
+ return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await L(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
+ return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=T(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
54
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
55
42
  if (!c || !c.captureStream) return { ok: false, error: 'no stage canvas' }
56
43
  let mime = 'video/webm;codecs=vp9'
@@ -68,7 +55,7 @@ examples:
68
55
  window.__sootsimFilm = st
69
56
  mr.start(200)
70
57
  return { ok: true }
71
- })()`);if(!M?.ok)return console.error(` film: stage capture failed: ${M?.error??"unknown"}`),1;await r(e,`((dur) => {
58
+ })()`);if(!M?.ok)return console.error(` film: stage capture failed: ${M?.error??"unknown"}`),1;await r(t,`((dur) => {
72
59
  const rs = window.SootSim?.replayStore
73
60
  if (!rs) return false
74
61
  const probed = rs.value?.playback?.durationMs
@@ -81,7 +68,7 @@ examples:
81
68
  }
82
69
  requestAnimationFrame(tick)
83
70
  return true
84
- })(${u})`),await b(e,"SootSim.bridges.threeMode.configure",{script:{id:h,progress:1,animate:!0,slow:!0}}),await s(u+700),await r(e,"(() => { const s = window.__sootsimFilm; if (s?.mr?.state === 'recording') s.mr.stop(); return true })()");let w=0;for(let o=0;o<60;o++){await s(500);let i=await r(e,"(() => { const s = window.__sootsimFilm; return { ready: !!(s && s.b64), size: s && s.b64 ? s.b64.length : 0 } })()");if(i?.ready&&i.size>0){w=i.size;break}}if(!w)return console.error(" film: stage recording never finished encoding"),1;let B=24e5,A="";for(let o=0;o<w;o+=B){let i=await r(e,`(() => ({ data: window.__sootsimFilm.b64.substr(${o}, ${B}) }))()`);A+=i.data}await r(e,"(() => { try { delete window.__sootsimFilm } catch {} return true })()");let g=Buffer.from(A,"base64");if(W(j(l),{recursive:!0}),y){let o=`${l}.tmp.webm`;E(o,g);let i=x("ffmpeg",["-y","-i",o,"-c:v","libx264","-vf","scale=trunc(iw/2)*2:trunc(ih/2)*2","-pix_fmt","yuv420p","-movflags","+faststart",l],{stdio:["ignore","ignore","pipe"]});if(i.status!==0){let U=String(i.stderr??"").split(`
71
+ })(${u})`),await b(t,"SootSim.bridges.threeMode.configure",{script:{id:h,progress:1,animate:!0,slow:!0}}),await n(u+700),await r(t,"(() => { const s = window.__sootsimFilm; if (s?.mr?.state === 'recording') s.mr.stop(); return true })()");let w=0;for(let o=0;o<60;o++){await n(500);let i=await r(t,"(() => { const s = window.__sootsimFilm; return { ready: !!(s && s.b64), size: s && s.b64 ? s.b64.length : 0 } })()");if(i?.ready&&i.size>0){w=i.size;break}}if(!w)return console.error(" film: stage recording never finished encoding"),1;let B=24e5,$="";for(let o=0;o<w;o+=B){let i=await r(t,`(() => ({ data: window.__sootsimFilm.b64.substr(${o}, ${B}) }))()`);$+=i.data}await r(t,"(() => { try { delete window.__sootsimFilm } catch {} return true })()");let g=Buffer.from($,"base64");if(W(q(l),{recursive:!0}),S){let o=`${l}.tmp.webm`;E(o,g);let i=x("ffmpeg",["-y","-i",o,"-c:v","libx264","-vf","scale=trunc(iw/2)*2:trunc(ih/2)*2","-pix_fmt","yuv420p","-movflags","+faststart",l],{stdio:["ignore","ignore","pipe"]});if(i.status!==0){let U=String(i.stderr??"").split(`
85
72
  `).filter(Boolean).slice(-4).join(`
86
73
  `);return console.error(` film: ffmpeg transcode failed:
87
- ${U}`),console.error(` film: source kept at ${o}`),1}N(o)}else E(l,g);return D||(d?.editor||await r(e,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', false)"),d?.threeMode||await r(e,"window.SootSim?.bridges?.settings?.set?.('threeMode', false)")),console.log(` film: saved ${l} (${(g.length/1e6).toFixed(1)}MB source)`),0}finally{e.close()}}export{le as runFilm};
74
+ ${U}`),console.error(` film: source kept at ${o}`),1}N(o)}else E(l,g);return z||(d?.editor||await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', false)"),d?.threeMode||await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', false)")),console.log(` film: saved ${l} (${(g.length/1e6).toFixed(1)}MB source)`),0}finally{t.close()}}export{ae as runFilm};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c,d,e,f,g,h}from"./chunk-QPA44BZC.js";import"./chunk-2RI6RC6I.js";import"./chunk-XCCDO6I2.js";import{c as a,d as b}from"./chunk-7FYIMLU4.js";import"./chunk-JPPGM6RZ.js";import"./chunk-RNW36VM5.js";import"./chunk-DKS75M2I.js";import"./chunk-TGYZYSDB.js";import"./chunk-DXCQP3VE.js";import"./chunk-4NJIXTVJ.js";import"./chunk-UBIGBHUM.js";import"./chunk-T2DHHOWE.js";import"./chunk-I4QJVACX.js";import"./chunk-S6BEA6OC.js";import"./chunk-OQ7SSRYK.js";import"./chunk-TXURXDZN.js";import"./chunk-TNKZWHD2.js";import"./chunk-4V2KYK5T.js";import"./chunk-E6DZD6JD.js";import"./chunk-7GZ6XF2B.js";import"./chunk-ZJZYGLJ2.js";import"./chunk-COEKUTWV.js";import"./chunk-UWFAWMPE.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-FH7DQ2HB.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-I7AWRAXM.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c}from"./chunk-CVDC2ER2.js";import"./chunk-RV67EC7L.js";import"./chunk-FH7DQ2HB.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-I7AWRAXM.js";import"./chunk-7GVBNEQ3.js";import"./chunk-X5FTDIHQ.js";import"./chunk-SU5WQ4SQ.js";import"./chunk-3WQISFAK.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,4 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as e,b as s}from"./chunk-AFRXWKTA.js";import"./chunk-RV67J726.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as e,b as s}from"./chunk-I7AWRAXM.js";import"./chunk-3WQISFAK.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
@@ -1,2 +1,4 @@
1
- /*! sootsim v0.1.293 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-WOWLO4LL.js";import"./chunk-RV67J726.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,Q as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,B as readOrCreateAnonymousId,y as readSharedConfig,A as readTelemetryEnabled,R as removeDaemonLockfile,S as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,O as writeDaemonLockfile,P as writeDevBridgeLockfile,E as writeRuntimeUpgradeNotice,z as writeSharedConfig,C as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,Q as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,B as readOrCreateAnonymousId,y as readSharedConfig,A as readTelemetryEnabled,R as removeDaemonLockfile,S as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,O as writeDaemonLockfile,P as writeDevBridgeLockfile,E as writeRuntimeUpgradeNotice,z as writeSharedConfig,C as writeTelemetryEnabled};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{j as a,k as b}from"./chunk-7FYIMLU4.js";import"./chunk-JPPGM6RZ.js";import"./chunk-TGYZYSDB.js";import"./chunk-DXCQP3VE.js";import"./chunk-4NJIXTVJ.js";import"./chunk-UBIGBHUM.js";import"./chunk-T2DHHOWE.js";import"./chunk-I4QJVACX.js";import"./chunk-S6BEA6OC.js";import"./chunk-OQ7SSRYK.js";import"./chunk-TXURXDZN.js";import"./chunk-TNKZWHD2.js";import"./chunk-4V2KYK5T.js";import"./chunk-E6DZD6JD.js";import"./chunk-7GZ6XF2B.js";import"./chunk-ZJZYGLJ2.js";import"./chunk-Y6FJ5FCY.js";import"./chunk-FH7DQ2HB.js";import"./chunk-XQRUWC3F.js";import"./chunk-ETDZQUGI.js";import"./chunk-6VF477QO.js";import"./chunk-K7LQB4IF.js";import"./chunk-I7AWRAXM.js";import"./chunk-7GVBNEQ3.js";import"./chunk-3WQISFAK.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.295 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-WFYQNZTT.js";import"./chunk-I4QJVACX.js";import"./chunk-4ODQVUBH.js";import"./chunk-3WQISFAK.js";export{a as runInstallDesktop};