sootsim 0.1.46 → 0.1.48

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 (138) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-4SFE3DNP.js → agent-AX2IIGGA.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-BCXD55HW.js → agent-wrapper-CYIA4WBO.js} +2 -2
  4. package/dist-cli/chunks/{assert-ILRVN6CB.js → assert-WXUMY4WQ.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-SHBSE54I.js +2 -0
  6. package/dist-cli/chunks/beta-HUTLG7S5.js +2 -0
  7. package/dist-cli/chunks/chunk-2QAH2UO3.js +2 -0
  8. package/dist-cli/chunks/{chunk-WWEMLI77.js → chunk-2V4MZ2GA.js} +1 -1
  9. package/dist-cli/chunks/{chunk-Z7J6LG53.js → chunk-3CNCQHRS.js} +2 -2
  10. package/dist-cli/chunks/{chunk-SG7ICXM2.js → chunk-5TJ62H7F.js} +2 -2
  11. package/dist-cli/chunks/{chunk-OMPAUB4V.js → chunk-5TX3TMN5.js} +3 -3
  12. package/dist-cli/chunks/{chunk-X7P3CGPY.js → chunk-5ZDXHLTR.js} +3 -3
  13. package/dist-cli/chunks/chunk-77DLIFAS.js +2 -0
  14. package/dist-cli/chunks/{chunk-FCFKR7EM.js → chunk-7D357J2J.js} +2 -2
  15. package/dist-cli/chunks/{chunk-OZICEBUA.js → chunk-AHSGYL4N.js} +2 -2
  16. package/dist-cli/chunks/{chunk-MGEB3WEI.js → chunk-BLUM4WIT.js} +1 -1
  17. package/dist-cli/chunks/{chunk-OHI4DJSD.js → chunk-CUDHQVA5.js} +2 -2
  18. package/dist-cli/chunks/{chunk-DGAHFMAU.js → chunk-DMW52773.js} +2 -2
  19. package/dist-cli/chunks/chunk-EFKEXVQX.js +1 -0
  20. package/dist-cli/chunks/{chunk-Z6BJVYOU.js → chunk-FTMYUCDK.js} +1 -1
  21. package/dist-cli/chunks/chunk-G7F6XU5L.js +1 -0
  22. package/dist-cli/chunks/{chunk-H46ZLTT5.js → chunk-HDDGAW2M.js} +1 -1
  23. package/dist-cli/chunks/{chunk-GWOV6KFE.js → chunk-HFYLZ5KC.js} +1 -1
  24. package/dist-cli/chunks/{chunk-PEXPACO5.js → chunk-HHP64ICF.js} +1 -1
  25. package/dist-cli/chunks/chunk-INIDEXC4.js +66 -0
  26. package/dist-cli/chunks/chunk-ITMSXL4X.js +11 -0
  27. package/dist-cli/chunks/{chunk-KETYRULQ.js → chunk-JKDJWOSQ.js} +2 -2
  28. package/dist-cli/chunks/{chunk-4OPZYTVB.js → chunk-JNXNANRK.js} +1 -1
  29. package/dist-cli/chunks/{chunk-WD36PEEJ.js → chunk-JT6IVW3F.js} +2 -2
  30. package/dist-cli/chunks/{chunk-MJD6C3BG.js → chunk-JTLMW6K5.js} +2 -2
  31. package/dist-cli/chunks/{chunk-BVXZZOBA.js → chunk-KQV52OMN.js} +2 -2
  32. package/dist-cli/chunks/{chunk-FLJAN5PS.js → chunk-L7QWUG47.js} +2 -2
  33. package/dist-cli/chunks/chunk-LIXV3IFT.js +1 -0
  34. package/dist-cli/chunks/{chunk-7CZ5VL7E.js → chunk-LOLX4MOY.js} +1 -1
  35. package/dist-cli/chunks/{chunk-XU27QCRX.js → chunk-LWPLYZ6M.js} +1 -1
  36. package/dist-cli/chunks/{chunk-XT36ZR2H.js → chunk-MSCMYKPC.js} +1 -1
  37. package/dist-cli/chunks/{chunk-PRRVFNFG.js → chunk-NODGVLX3.js} +2 -2
  38. package/dist-cli/chunks/{chunk-K3I6VLF3.js → chunk-NTQIMLT6.js} +1 -1
  39. package/dist-cli/chunks/chunk-NXSQ5PG3.js +1 -0
  40. package/dist-cli/chunks/{chunk-XSJ4SU63.js → chunk-T2GQMNQU.js} +3 -3
  41. package/dist-cli/chunks/{chunk-PG6FUKZX.js → chunk-TZMGFGPI.js} +2 -2
  42. package/dist-cli/chunks/{chunk-M5HZVUQQ.js → chunk-UAVOHNUW.js} +1 -1
  43. package/dist-cli/chunks/{chunk-QXJR74QV.js → chunk-VOYMDSN6.js} +1 -1
  44. package/dist-cli/chunks/{chunk-XKNZR4BB.js → chunk-WQDITZHE.js} +2 -2
  45. package/dist-cli/chunks/{chunk-N7DDQ5ZB.js → chunk-X46E3R6L.js} +2 -2
  46. package/dist-cli/chunks/{chunk-S4OSFQIC.js → chunk-YX7WHJEC.js} +2 -2
  47. package/dist-cli/chunks/{chunk-WRNSX5RR.js → chunk-Z3OFWNVG.js} +2 -2
  48. package/dist-cli/chunks/{chunk-YZ7BSNJJ.js → chunk-Z4X6PVCT.js} +2 -2
  49. package/dist-cli/chunks/{chunk-MDSET24U.js → chunk-Z75LPOIA.js} +2 -2
  50. package/dist-cli/chunks/{chunk-W52DGZNV.js → chunk-ZVO4ABLX.js} +1 -1
  51. package/dist-cli/chunks/{compat-IC7P6QWF.js → compat-7Z7M6PD5.js} +3 -3
  52. package/dist-cli/chunks/{config-WVL2Y7UU.js → config-OSEZ3KWG.js} +2 -2
  53. package/dist-cli/chunks/control-BKBHXPZP.js +2 -0
  54. package/dist-cli/chunks/cpu-profile-OL2VPDCX.js +2 -0
  55. package/dist-cli/chunks/{daemon-TH7B22C4.js → daemon-G3ON7OHZ.js} +3 -3
  56. package/dist-cli/chunks/{debug-MN6RXRJO.js → debug-4ONAV32N.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-RZ3S32T3.js +2 -0
  58. package/dist-cli/chunks/{detox-BUJ3IOIB.js → detox-W2RYM6BG.js} +3 -3
  59. package/dist-cli/chunks/{device-MUCGW2TT.js → device-T4VS4T3K.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-5NADXMRL.js → diagnose-ZU7OZQ2A.js} +2 -2
  61. package/dist-cli/chunks/drivers-BM23IJSX.js +2 -0
  62. package/dist-cli/chunks/{electron-ON6434HQ.js → electron-YPZABLAA.js} +3 -3
  63. package/dist-cli/chunks/flow-6P474SWM.js +2 -0
  64. package/dist-cli/chunks/{hints-23C3BW62.js → hints-Z3UOKTIN.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-DAI3XZLG.js → home-paths-UQUVRQ4U.js} +2 -2
  66. package/dist-cli/chunks/{inspect-UVS4UIJF.js → inspect-6E4HV34I.js} +3 -3
  67. package/dist-cli/chunks/install-55S5HGKP.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-6BT3VL2C.js → install-desktop-676SA6NV.js} +3 -3
  69. package/dist-cli/chunks/{keys-4OT37H4C.js → keys-ZFI5OOFG.js} +2 -2
  70. package/dist-cli/chunks/{launch-2C3YGABQ.js → launch-VNV77QV6.js} +3 -3
  71. package/dist-cli/chunks/{login-NWY5ENAT.js → login-DP4UYZZZ.js} +4 -4
  72. package/dist-cli/chunks/{logout-6BHGSVMN.js → logout-QUVFZJN6.js} +2 -2
  73. package/dist-cli/chunks/{maestro-V7WIYUNE.js → maestro-Y26D3HN5.js} +15 -15
  74. package/dist-cli/chunks/{preview-H2ACZ26A.js → preview-JYFSFZ4J.js} +2 -2
  75. package/dist-cli/chunks/{profile-ZLDFCIZA.js → profile-UEL5Q6F6.js} +2 -2
  76. package/dist-cli/chunks/{react-PEM4I7YB.js → react-7FIMNUQ6.js} +2 -2
  77. package/dist-cli/chunks/{record-KVBDN3GC.js → record-7FXCSWQ4.js} +5 -5
  78. package/dist-cli/chunks/runtime-CNLDNL2W.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-ECDTRILR.js → runtime-delivery-HKT3TDML.js} +2 -2
  80. package/dist-cli/chunks/screenshot-ZYXLM2YB.js +28 -0
  81. package/dist-cli/chunks/{screenshot-mode-DKPHJONC.js → screenshot-mode-CJ2G6CPK.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-5UQ36N7Q.js → screenshots-DFKJAKBF.js} +2 -2
  83. package/dist-cli/chunks/{server-LADTO7OS.js → server-7IKLGAS3.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-HMDFTMDA.js +2 -0
  85. package/dist-cli/chunks/{skills-FUN6M66H.js → skills-PQU7B22X.js} +2 -2
  86. package/dist-cli/chunks/{start-A6FDAXGU.js → start-VWUFFDUJ.js} +4 -4
  87. package/dist-cli/chunks/store-KZH4YGAS.js +2 -0
  88. package/dist-cli/chunks/telemetry-PBJ7ERBC.js +2 -0
  89. package/dist-cli/chunks/{test-HPXQTADO.js → test-TK7FINPS.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-2APCW2N7.js → three-mode-RBLRHOPV.js} +2 -2
  91. package/dist-cli/chunks/{timeline-6D6V6LRX.js → timeline-HK3AO5R7.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-KZIO3ZJH.js → upgrade-2LKSTHYL.js} +2 -2
  93. package/dist-cli/chunks/upload-LDVG27PU.js +2 -0
  94. package/dist-cli/chunks/{web-MR4EQWCC.js → web-MVMHXQAE.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-FHQD42JV.js → what-happened-LXCQCYF3.js} +2 -2
  96. package/dist-cli/chunks/{whoami-GHNFMMK4.js → whoami-QIYDODGD.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +1 -1
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/dev-bundle-resolution.cjs +2 -16
  107. package/dist-lib/home-paths.cjs +1 -1
  108. package/dist-lib/host/bridge-host.cjs +1 -1
  109. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/metro.cjs +1 -1
  112. package/dist-lib/profiles.cjs +1 -1
  113. package/dist-lib/render-mode.cjs +1 -1
  114. package/dist-lib/vite-base.cjs +1 -1
  115. package/dist-lib/vite.cjs +1 -1
  116. package/package.json +1 -1
  117. package/dist-cli/chunks/auto-bootstrap-A4ML6QTW.js +0 -2
  118. package/dist-cli/chunks/beta-34TOAZFI.js +0 -2
  119. package/dist-cli/chunks/chunk-KV7XS7WL.js +0 -1
  120. package/dist-cli/chunks/chunk-PAOOYAVI.js +0 -2
  121. package/dist-cli/chunks/chunk-PKVNCXQD.js +0 -66
  122. package/dist-cli/chunks/chunk-RSMU24BE.js +0 -1
  123. package/dist-cli/chunks/chunk-T4H37KU7.js +0 -2
  124. package/dist-cli/chunks/chunk-UH5PKJXT.js +0 -1
  125. package/dist-cli/chunks/chunk-VWJ4O366.js +0 -1
  126. package/dist-cli/chunks/chunk-ZM4JL3VP.js +0 -11
  127. package/dist-cli/chunks/control-7VDRDQXQ.js +0 -2
  128. package/dist-cli/chunks/cpu-profile-FJIMZKXF.js +0 -2
  129. package/dist-cli/chunks/demo-app-registry-ISNBFJTI.js +0 -2
  130. package/dist-cli/chunks/drivers-RXVSKXUD.js +0 -2
  131. package/dist-cli/chunks/flow-WI5MN76X.js +0 -2
  132. package/dist-cli/chunks/install-QKH2JQGE.js +0 -2
  133. package/dist-cli/chunks/runtime-LLWAHSVR.js +0 -2
  134. package/dist-cli/chunks/screenshot-PJEMMFQO.js +0 -28
  135. package/dist-cli/chunks/setup-repo-TXI7Q6F6.js +0 -2
  136. package/dist-cli/chunks/store-KTDAA7SP.js +0 -2
  137. package/dist-cli/chunks/telemetry-VPFS3BGR.js +0 -2
  138. package/dist-cli/chunks/upload-LDL3FZKD.js +0 -2
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-W52DGZNV.js";import{l as D}from"./chunk-M5HZVUQQ.js";import{a as T}from"./chunk-GWOV6KFE.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("./demo-app-registry-ISNBFJTI.js")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R}from"./chunk-ZVO4ABLX.js";import{l as D}from"./chunk-UAVOHNUW.js";import{a as T}from"./chunk-HFYLZ5KC.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("./demo-app-registry-RZ3S32T3.js")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
3
3
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Re(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(O(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=j(e),n=h();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ne(e,t){let r=J(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,f.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ee.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let c=I(d);c&&t(c)});let a=!1;return()=>{if(!a){a=!0;try{s.close()}catch{}try{o.destroy()}catch{}}}}async function ae(e,t,r){let n=i.openSync(e,f.O_RDWR|f.O_NONBLOCK),o=Buffer.alloc(8192),s="",a=Date.now()+r;try{for(;Date.now()<a;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(c){if(c.code!=="EAGAIN")throw c;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let c;for(;(c=s.indexOf(`
4
4
  `))>=0;){let g=s.slice(0,c);s=s.slice(c+1);let A=I(g);if(A&&t(A))return A}}else await new Promise(c=>setTimeout(c,30))}return null}finally{i.closeSync(n)}}export{I as a,h as b,ge as c,F as d,ye as e,he as f,Se as g,we as h,k as i,C as j,v as k,ve as l,j as m,W as n,J as o,te as p,O as q,re as r,l as s,Te as t,De as u,Re as v,Ne as w};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-QXJR74QV.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-VOYMDSN6.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GWOV6KFE.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.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HFYLZ5KC.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-MR4EQWCC.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-MR4EQWCC.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-MVMHXQAE.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-MVMHXQAE.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GWOV6KFE.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HFYLZ5KC.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m}from"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import"./chunk-HHP64ICF.js";import"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-2QAH2UO3.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as I,e as N,i as S}from"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as _}from"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import{g as I,o as C,p as w,q as B}from"./chunk-M5HZVUQQ.js";import{a as W}from"./chunk-GWOV6KFE.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as _}from"./chunk-77DLIFAS.js";import"./chunk-Z3OFWNVG.js";import"./chunk-G7F6XU5L.js";import{g as I,o as C,p as w,q as B}from"./chunk-UAVOHNUW.js";import{a as W}from"./chunk-HFYLZ5KC.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:s}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -79,5 +79,5 @@ WantedBy=default.target
79
79
  the launchd / systemd agent would point at workspace artifacts that change
80
80
  between sessions, and would serve stale prod-built engine assets instead of
81
81
  the live \`bun dev:sootsim\` output. start the daemon manually in another
82
- shell with: bun sootsim server
82
+ shell with: sootsim server
83
83
  (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to override.)`);let r=ot();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){G()&&console.log(` migrated away from legacy ${E} plist`);let o=b();if(a(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(U(o),{recursive:!0}),R(o,nt(r,t)),console.log(` wrote ${o}`);let s=`gui/${process.getuid()}`,i=`${s}/${p}`,f=()=>{let l=n("launchctl",["bootstrap",s,o],{stdio:"pipe",encoding:"utf8"}),k=(l.stderr||l.stdout||"").trim();if(l.status!==0)return{ok:!1,reason:`bootstrap exit ${l.status}${k?`: ${k}`:""}`};let A=n("launchctl",["print",i],{encoding:"utf8"});return A.status!==0?{ok:!1,reason:`bootstrap returned 0 but service not registered (print exit ${A.status})`}:{ok:!0}},u=f();if(!u.ok){let l=u.reason;if(n("launchctl",["bootout",i],{stdio:"ignore"}),u=f(),!u.ok)throw new Error(`launchctl bootstrap failed: ${u.reason}`+(l!==u.reason?` (initial: ${l})`:"")+" \u2014 try `sootsim daemon uninstall` then retry, or reboot if launchd state is stuck.")}let c=Date.now()+4e3,g,y;for(;Date.now()<c;){let l=n("launchctl",["print",i],{encoding:"utf8"});if(l.status===0&&(g=l.stdout?.match(/state\s*=\s*(\w+)/)?.[1],y=l.stdout?.match(/pid\s*=\s*(\d+)/)?.[1],g==="running"||y))break;await new Promise(k=>setTimeout(k,150))}if(g!=="running"&&!y)throw new Error(`daemon registered but did not reach running state within 4s (last state: ${g||"unknown"}). check ${m(h,"server.err.log")} \u2014 typically a stale runtime or a port already bound by another process.`);console.log(` registered (state: ${g||"unknown"}${y?`, pid ${y}`:""}, log: ${m(h,"server.err.log")})`);return}if(process.platform==="linux"){let o=x();if(a(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(U(o),{recursive:!0}),R(o,it(r,t)),console.log(` wrote ${o}`);let s=n("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(s.status!==0){let c=(s.stderr||s.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${c?`: ${c}`:""}`)}let i=n("systemctl",["--user","enable","--now",d],{stdio:"pipe",encoding:"utf8"});if(i.status!==0){let c=(i.stderr||i.stdout||"").trim();throw new Error(`systemctl enable --now failed${c?`: ${c}`:""} \u2014 try \`sootsim daemon uninstall\` then retry.`)}let u=(n("systemctl",["--user","is-active",d],{encoding:"utf8"}).stdout||"").trim()||"unknown";console.log(` registered (state: ${u}, journalctl --user -u ${d} to tail logs)`);return}console.error(` sootsim daemon install is not supported on ${process.platform}`),console.error(" run 'sootsim server' in a persistent shell instead"),process.exit(1)}async function ut(){if(process.platform==="darwin"){let t=b(),e=G();e&&console.log(` removed legacy ${j()}`);let r=a(t);r&&(n("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"ignore"}),S(t,{force:!0}),console.log(` removed ${t}`));let o=w();a(o)&&(S(o,{recursive:!0,force:!0}),console.log(` removed ${o}`)),!r&&!e&&console.log(" not installed");return}if(process.platform==="linux"){let t=x();if(!a(t)){console.log(" not installed");return}n("systemctl",["--user","disable","--now",d],{stdio:"ignore"}),S(t,{force:!0}),n("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),console.log(` removed ${t}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function dt(){if(process.platform==="darwin"){let t=b();if(!a(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=ft(t);e&&console.log(` binary: ${e}`);let r=n("launchctl",["print",`gui/${process.getuid()}/${p}`],{encoding:"utf8"});if(r.status===0){let o=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],s=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${o||"unknown"}${s?` (pid ${s})`:""}`)}else console.log(" state: not running");return}if(process.platform==="linux"){let t=x();if(!a(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=n("systemctl",["--user","is-active",d],{encoding:"utf8"});console.log(` state: ${e.stdout.trim()||"unknown"}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function mt(){if(process.platform==="darwin"){let t=b();a(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=n("launchctl",["kickstart","-k",`gui/${process.getuid()}/${p}`],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` kickstart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}if(process.platform==="linux"){let t=x();a(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=n("systemctl",["--user","restart",d],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` restart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function pt(){if(process.platform==="darwin"){n("launchctl",["kickstart",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){n("systemctl",["--user","start",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function gt(){if(process.platform==="darwin"){n("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){n("systemctl",["--user","stop",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function ft(t){try{return et(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{lt as daemonInstall,At as runDaemon};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as f}from"./chunk-PRRVFNFG.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-K3I6VLF3.js";import{b as A}from"./chunk-PEXPACO5.js";import{c as S,e as $,g as N}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as f}from"./chunk-NODGVLX3.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-NTQIMLT6.js";import{b as A}from"./chunk-HHP64ICF.js";import{c as S,e as $,g as N}from"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-UVS4UIJF.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-6E4HV34I.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  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 D(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 O(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=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-TZMGFGPI.js";import"./chunk-HFYLZ5KC.js";export{a as APPS};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as S}from"./chunk-XSJ4SU63.js";import"./chunk-OZICEBUA.js";import"./chunk-FLJAN5PS.js";import"./chunk-RSMU24BE.js";import"./chunk-Z7J6LG53.js";import"./chunk-SG7ICXM2.js";import"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-PG6FUKZX.js";import"./chunk-PKVNCXQD.js";import"./chunk-KETYRULQ.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-MJD6C3BG.js";import"./chunk-T4H37KU7.js";import"./chunk-MDSET24U.js";import"./chunk-QXJR74QV.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as S}from"./chunk-T2GQMNQU.js";import"./chunk-AHSGYL4N.js";import"./chunk-L7QWUG47.js";import"./chunk-NXSQ5PG3.js";import"./chunk-3CNCQHRS.js";import"./chunk-5TJ62H7F.js";import"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import"./chunk-HHP64ICF.js";import"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-TZMGFGPI.js";import"./chunk-INIDEXC4.js";import"./chunk-JKDJWOSQ.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-JTLMW6K5.js";import"./chunk-2QAH2UO3.js";import"./chunk-Z75LPOIA.js";import"./chunk-VOYMDSN6.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-77DLIFAS.js";import"./chunk-Z3OFWNVG.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -46,4 +46,4 @@ describe('example', () => {
46
46
  })
47
47
  })
48
48
  `),console.log(` created ${r}`)),console.log(`
49
- next:`),console.log(" bun sootsim detox # run the sample"),console.log(" bun sootsim detox --watch"),process.exit(0)}export{B as runDetox};
49
+ next:`),console.log(" sootsim detox # run the sample"),console.log(" sootsim detox --watch"),process.exit(0)}export{B as runDetox};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-RSMU24BE.js";import"./chunk-MJD6C3BG.js";import"./chunk-MDSET24U.js";import{f as c,g as r,h as g}from"./chunk-QXJR74QV.js";import{c as d,e as l,h as a}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function h(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-NXSQ5PG3.js";import"./chunk-JTLMW6K5.js";import"./chunk-Z75LPOIA.js";import{f as c,g as r,h as g}from"./chunk-VOYMDSN6.js";import{c as d,e as l,h as a}from"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as v,e as E,h as b}from"./chunk-DGAHFMAU.js";import{b as $}from"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as v,e as E,h as b}from"./chunk-DMW52773.js";import{b as $}from"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-EFKEXVQX.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.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,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-H46ZLTT5.js";import"./chunk-UH5PKJXT.js";import{a as v,f as h}from"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import{b as f,g as u}from"./chunk-FCFKR7EM.js";import{a as p}from"./chunk-XU27QCRX.js";import{c as m}from"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-T4H37KU7.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-HDDGAW2M.js";import"./chunk-EFKEXVQX.js";import{a as v,f as h}from"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import"./chunk-HHP64ICF.js";import{b as f,g as u}from"./chunk-7D357J2J.js";import{a as p}from"./chunk-LWPLYZ6M.js";import{c as m}from"./chunk-WQDITZHE.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-2QAH2UO3.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-6BT3VL2C.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-676SA6NV.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-T2GQMNQU.js";import"./chunk-AHSGYL4N.js";import"./chunk-L7QWUG47.js";import"./chunk-NXSQ5PG3.js";import"./chunk-3CNCQHRS.js";import"./chunk-5TJ62H7F.js";import"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import"./chunk-HHP64ICF.js";import"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-TZMGFGPI.js";import"./chunk-INIDEXC4.js";import"./chunk-JKDJWOSQ.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-JTLMW6K5.js";import"./chunk-2QAH2UO3.js";import"./chunk-Z75LPOIA.js";import"./chunk-VOYMDSN6.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-77DLIFAS.js";import"./chunk-Z3OFWNVG.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-BVXZZOBA.js";import"./chunk-WWEMLI77.js";import"./chunk-GWOV6KFE.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-KQV52OMN.js";import"./chunk-2V4MZ2GA.js";import"./chunk-HFYLZ5KC.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,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-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,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-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as G}from"./chunk-BVXZZOBA.js";import{a as De,b as Be}from"./chunk-7CZ5VL7E.js";import{a as X,b as D,c as B,d as z,e as ce,f as ne,g as st,h as nt,i as $e}from"./chunk-PRRVFNFG.js";import{D as ot,a as je,b as Le,c as Je,d as qe,e as We,f as we,g as xe,h as He,i as Ke,j as Ue,k as ze,l as Ye,m as Ge,n as Xe,o as Ve,p as Qe,q as Ze,u as et,w as se,x as tt}from"./chunk-K3I6VLF3.js";import{a as Ee,e as le}from"./chunk-SG7ICXM2.js";import{b as rt,c as it,i as at}from"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import{a as Ce}from"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import{a as ye,c as he,d as _e}from"./chunk-MGEB3WEI.js";import{a as Ie}from"./chunk-T4H37KU7.js";import{c as Ae,e as Pe,f as Oe,g as Re,h as be}from"./chunk-DGAHFMAU.js";import{b as Fe}from"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as lt,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function ct(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=ct();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(lt(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return lt(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=ct();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as G}from"./chunk-KQV52OMN.js";import{a as De,b as Be}from"./chunk-LOLX4MOY.js";import{a as X,b as D,c as B,d as z,e as ce,f as ne,g as st,h as nt,i as $e}from"./chunk-NODGVLX3.js";import{D as ot,a as je,b as Le,c as Je,d as qe,e as We,f as we,g as xe,h as He,i as Ke,j as Ue,k as ze,l as Ye,m as Ge,n as Xe,o as Ve,p as Qe,q as Ze,u as et,w as se,x as tt}from"./chunk-NTQIMLT6.js";import{a as Ee,e as le}from"./chunk-5TJ62H7F.js";import{b as rt,c as it,i as at}from"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import{a as Ce}from"./chunk-HHP64ICF.js";import"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import{a as ye,c as he,d as _e}from"./chunk-BLUM4WIT.js";import{a as Ie}from"./chunk-2QAH2UO3.js";import{c as Ae,e as Pe,f as Oe,g as Re,h as be}from"./chunk-DMW52773.js";import{b as Fe}from"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as lt,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function ct(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=ct();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(lt(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return lt(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=ct();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
3
3
  `)}function eo(s,d){let a=d.trim()||"default";return`${s}:${a}`}function Se(s,d,a,l={}){let f=l.nowMs??Date.now(),i=l.cooldownMs??Xt,y=Qt(f),S=eo(s,d),I=y.entries[S];return I&&I.signature===a&&f-I.updatedAt<i?!1:(y.entries[S]={signature:a,updatedAt:f},Zt(y),!0)}async function dt(s,d={args:[]}){let a=await je(s);if(D(d.args)){B(a);return}console.log(` nodes: ${a.nodes}`)}function ke(s,d){let a=s.indexOf(d);return a>=0&&a+1<s.length?s[a+1]:null}async function ut(s){let{bridge:d,args:a,positional:l}=s,f=a.includes("--verbose")||a.includes("-v"),i=D(a),y=f&&!i,S=a.includes("--watch")||a.includes("-w"),I=1e3,v=a.includes("--compact"),b=a.includes("--no-xy"),k=ke(a,"--testid-like"),_=ke(a,"--only"),T=ke(a,"--subtree"),E=l[1],c=E?/[*?]/.test(E):!1,J=!c&&!_?E:void 0,U=_??(c?E:void 0),C=async()=>{await ce(d,{verbose:y});let Y=await qe(d,{describe:!0,verbose:f,filter:J||"",testIdLike:k||void 0,onlyGlob:U||void 0,subtreeRoot:T||void 0,compact:v,hideXy:b}),W=Y?.tree,w=Y?.shell,M=Y?.keyboard;if(i){B({shell:w,tree:W??"",keyboard:M});return}if(w&&typeof w=="object"){let P=[w.state?`state=${w.state}`:null,w.activeApp?`app=${w.activeApp}`:null,w.showSwitcher?"switcher":null,w.switcherPhase&&w.switcherPhase!=="idle"?`phase=${w.switcherPhase}`:null].filter(Boolean);P.length>0&&console.log(` shell: ${P.join(" ")}`)}if(typeof W=="string"&&W.startsWith("__SUBTREE_NOT_FOUND__:")){let P=W.slice(22);console.log(` subtree root not found: ${P}`),G("subtree-root-not-found",P);return}if(!W){let P=Y?.nodeCount??0;console.log(" no matching nodes found"),!(J||k||U||T)&&P<10&&G("app-still-loading",P);return}if(console.log(W),!(J||k||U||T)&&!S&&W.split(`
4
4
  `).length>=80&&G("describe-use-filters"),M&&M.visible){let P=M.spec,V=[P?.keyboardType?`type=${P.keyboardType}`:null,P?.returnKeyType&&P.returnKeyType!=="default"?`return=${P.returnKeyType}`:null,M.mode!=="letters"?`mode=${M.mode}`:null,M.shifted?"shift":null,M.capsLock?"caps":null,P?.autoCapitalize&&P.autoCapitalize!=="sentences"?`autoCap=${P.autoCapitalize}`:null,M.accessoryBarId?`accessory=${M.accessoryBarId}`:null].filter(Boolean);console.log(`
5
5
  keyboard: ${V.join(" ")||"visible"}`)}};if(S)for(console.log(` watching... (Ctrl+C to stop)
@@ -135,7 +135,7 @@ import{a as G}from"./chunk-BVXZZOBA.js";import{a as De,b as Be}from"./chunk-7CZ5
135
135
  `);console.log(`${t??""}
136
136
 
137
137
  ${o}
138
- `),process.exit(0)}let _=f.wsPort,T=f.simId,E=f.commandTimeoutMs;if(y==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-RXVSKXUD.js"),t=e();console.log(` available drivers (${t.length}):
138
+ `),process.exit(0)}let _=f.wsPort,T=f.simId,E=f.commandTimeoutMs;if(y==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-BM23IJSX.js"),t=e();console.log(` available drivers (${t.length}):
139
139
  `);let o=Math.max(...t.map(n=>n.id.length),6),r=Math.max(...t.map(n=>n.kind.length),4);for(let n of t){let u=n.available?"\u2713":"\u2717",m=n.id.padEnd(o),$=n.kind.padEnd(r);console.log(` ${u} ${m} ${$} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let c=Pe(f),J=T||"default",U=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]);function C(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 L(e){let t=mt()?1200:350;try{let{settled:o,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});o||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
140
140
  `)}catch{}}async function Y(){try{return await c.send({type:"evaluate",code:`(() => ({
141
141
  console: window.__sootsimConsole?.count?.() || null,
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-YX7WHJEC.js";import"./chunk-HDDGAW2M.js";import"./chunk-5ZDXHLTR.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-77DLIFAS.js";import"./chunk-Z3OFWNVG.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-H46ZLTT5.js";import{a as x}from"./chunk-XU27QCRX.js";import"./chunk-GWOV6KFE.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(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,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} 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}% ${n} / ${t} MB`}async function _(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 n=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-HDDGAW2M.js";import{a as x}from"./chunk-LWPLYZ6M.js";import"./chunk-HFYLZ5KC.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(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,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} 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}% ${n} / ${t} MB`}async function _(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 n=o.stdout.trim().split(`
3
3
  `),t=n[n.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=v(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]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
20
  `),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${e instanceof Error?e.message:String(e)}`),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-VPFS3BGR.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),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 electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
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-PBJ7ERBC.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),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 electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l,b as d,c as k,d as y,e as g}from"./chunk-KETYRULQ.js";import{d as c}from"./chunk-WRNSX5RR.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l,b as d,c as k,d as y,e as g}from"./chunk-JKDJWOSQ.js";import{d as c}from"./chunk-Z3OFWNVG.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
3
3
  created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
4
4
  secret: ${t.secret}
5
5
  `),console.log(` copy this now \u2014 we can't show it again.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-UH5PKJXT.js";import{b as m}from"./chunk-FCFKR7EM.js";import{a as u}from"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-EFKEXVQX.js";import{b as m}from"./chunk-7D357J2J.js";import{a as u}from"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
3
3
  sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
4
4
 
5
5
  usage:
@@ -13,4 +13,4 @@ options:
13
13
  examples:
14
14
  sootsim launch
15
15
  sootsim launch --version 1.2.3
16
- `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-LLWAHSVR.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
16
+ `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-CNLDNL2W.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as f,d as m}from"./chunk-WRNSX5RR.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as f,d as m}from"./chunk-Z3OFWNVG.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
3
3
  sootsim login \u2014 sign in so desktop uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${t}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-VPFS3BGR.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
24
+ </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-PBJ7ERBC.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-VPFS3BGR.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-VPFS3BGR.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-PBJ7ERBC.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-PBJ7ERBC.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-PAOOYAVI.js";import{a as t,c as o}from"./chunk-WRNSX5RR.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-77DLIFAS.js";import{a as t,c as o}from"./chunk-Z3OFWNVG.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as h}from"./chunk-XSJ4SU63.js";import"./chunk-OZICEBUA.js";import"./chunk-FLJAN5PS.js";import"./chunk-RSMU24BE.js";import"./chunk-Z7J6LG53.js";import"./chunk-SG7ICXM2.js";import"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-PG6FUKZX.js";import"./chunk-PKVNCXQD.js";import"./chunk-KETYRULQ.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-MJD6C3BG.js";import"./chunk-T4H37KU7.js";import"./chunk-MDSET24U.js";import"./chunk-QXJR74QV.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as h}from"./chunk-T2GQMNQU.js";import"./chunk-AHSGYL4N.js";import"./chunk-L7QWUG47.js";import"./chunk-NXSQ5PG3.js";import"./chunk-3CNCQHRS.js";import"./chunk-5TJ62H7F.js";import"./chunk-ITMSXL4X.js";import"./chunk-CUDHQVA5.js";import"./chunk-HHP64ICF.js";import"./chunk-7D357J2J.js";import"./chunk-LWPLYZ6M.js";import"./chunk-WQDITZHE.js";import"./chunk-TZMGFGPI.js";import"./chunk-INIDEXC4.js";import"./chunk-JKDJWOSQ.js";import"./chunk-LIXV3IFT.js";import"./chunk-JNXNANRK.js";import"./chunk-JTLMW6K5.js";import"./chunk-2QAH2UO3.js";import"./chunk-Z75LPOIA.js";import"./chunk-VOYMDSN6.js";import"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-77DLIFAS.js";import"./chunk-Z3OFWNVG.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -23,10 +23,10 @@ options:
23
23
  --slow <ms> delay between steps for natural pacing
24
24
 
25
25
  examples:
26
- bun sootsim maestro test .maestro/login.yaml
27
- bun sootsim maestro test .maestro/
28
- bun sootsim maestro --env USERNAME=alice test .maestro/login.yaml
29
- bun sootsim maestro init
26
+ sootsim maestro test .maestro/login.yaml
27
+ sootsim maestro test .maestro/
28
+ sootsim maestro --env USERNAME=alice test .maestro/login.yaml
29
+ sootsim maestro init
30
30
  `)}function x(){console.log(`
31
31
  sootsim maestro \u2014 compatibility matrix
32
32
 
@@ -55,7 +55,7 @@ not yet implemented (will throw "unsupported maestro verb"):
55
55
  addMedia, startRecording, stopRecording (use --record flag),
56
56
  repeat.while (only repeat.times is supported).
57
57
  `)}function w(t){return t.startsWith("-")}function S(t){let r=[];for(let e=0;e<t.length;e++){if(t[e]==="--env"||t[e]==="-e"){let o=t[e+1];if(!o||!o.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(o??"")})`);let a=o.indexOf("="),s=o.slice(0,a),p=o.slice(a+1);process.env[s]=p,e+=1;continue}r.push(t[e])}return r}function $(t){let r=[];for(let e=0;e<t.length;e++){let o=t[e];if(o==="--format"||o==="--output"||o==="--device"||o==="-d"){e+=1;continue}if(o==="--continuous"){console.warn(" warn: --continuous is not yet implemented in sootsim \u2014 running once");continue}r.push(o)}return r}function g(t){for(let r of y){let e=l.join(t,r);if(i.existsSync(e)&&i.statSync(e).isDirectory())return e}return null}function k(t){let r=i.statSync(t);if(r.isFile())return[t];if(!r.isDirectory())throw new Error(`not a file or directory: ${t}`);let e=i.readdirSync(t),o=[];for(let a of e){if(a.startsWith("."))continue;let s=l.join(t,a);i.statSync(s).isFile()&&(a.endsWith(".yaml")||a.endsWith(".yml"))&&o.push(s)}return o.sort(),o}async function E(t){let r=l.join(t,".maestro");i.mkdirSync(r,{recursive:!0});let e=l.join(r,"login.yaml");return i.existsSync(e)?(console.error(` error: ${e} already exists`),1):(i.writeFileSync(e,`# sootsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
58
- # run: bun sootsim maestro test .maestro/login.yaml
58
+ # run: sootsim maestro test .maestro/login.yaml
59
59
  appId: com.example.app
60
60
  ---
61
61
  - launchApp
@@ -67,14 +67,14 @@ appId: com.example.app
67
67
  - inputText: "secret123"
68
68
  - tapOn: "Sign in"
69
69
  - assertVisible: "Welcome"
70
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: bun sootsim maestro test .maestro/login.yaml"),0)}async function F(t,r={}){if(t.includes("--help")||t.includes("-h"))return b(),0;if(t.includes("--list-compat"))return x(),0;let e;try{e=S(t)}catch(n){return console.error(` error: ${n.message}`),1}e=$(e);let o=process.cwd(),a=e[0];if(a==="init")return E(o);let s=null,p;if(a==="test"){let n=e.slice(1).find(c=>!w(c));n?(s=l.resolve(o,n),p=e.slice(1).filter(c=>c!==n)):(s=g(o),p=e.slice(1))}else a&&!w(a)?(s=l.resolve(o,a),p=e.slice(1)):(s=g(o),p=e);if(!s)return console.error(`
70
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function F(t,r={}){if(t.includes("--help")||t.includes("-h"))return b(),0;if(t.includes("--list-compat"))return x(),0;let e;try{e=S(t)}catch(n){return console.error(` error: ${n.message}`),1}e=$(e);let o=process.cwd(),a=e[0];if(a==="init")return E(o);let s=null,p;if(a==="test"){let n=e.slice(1).find(c=>!w(c));n?(s=l.resolve(o,n),p=e.slice(1).filter(c=>c!==n)):(s=g(o),p=e.slice(1))}else a&&!w(a)?(s=l.resolve(o,a),p=e.slice(1)):(s=g(o),p=e);if(!s)return console.error(`
71
71
  error: no maestro flows found.
72
72
  expected one of: ${y.map(n=>`./${n}/`).join(", ")}
73
- or pass a flow explicitly: bun sootsim maestro test path/to/flow.yaml
74
- or scaffold a starter flow: bun sootsim maestro init
75
- `),1;if(!i.existsSync(s))return console.error(` error: ${s} not found`),1;let m;try{m=k(s)}catch(n){return console.error(` error: ${n.message}`),1}if(m.length===0)return console.error(` error: no *.yaml or *.yml files found in ${s}`),1;console.log(`
76
- sootsim maestro \u2014 ${m.length} flow${m.length===1?"":"s"}
73
+ or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
74
+ or scaffold a starter flow: sootsim maestro init
75
+ `),1;if(!i.existsSync(s))return console.error(` error: ${s} not found`),1;let u;try{u=k(s)}catch(n){return console.error(` error: ${n.message}`),1}if(u.length===0)return console.error(` error: no *.yaml or *.yml files found in ${s}`),1;console.log(`
76
+ sootsim maestro \u2014 ${u.length} flow${u.length===1?"":"s"}
77
77
  root: ${l.relative(o,s)||"."}
78
- `);let d=0,f=[];for(let n of m){console.log(`
79
- \u25B6 ${l.relative(o,n)}`);let c=[n,...p];r.port&&!p.includes("--url")&&c.push("--url",String(r.port));let u=0;try{u=await h(c)}catch(v){console.error(` x ${v.message}`),u=1}f.push({file:n,exit:u}),u!==0&&d===0&&(d=u)}if(m.length>1){console.log(`
80
- maestro summary:`);for(let c of f){let u=c.exit===0?"pass":"fail";console.log(` ${u} ${l.relative(o,c.file)}`)}let n=f.filter(c=>c.exit===0).length;console.log(` ${n}/${f.length} passed`)}return d}export{F as runMaestro};
78
+ `);let d=0,f=[];for(let n of u){console.log(`
79
+ \u25B6 ${l.relative(o,n)}`);let c=[n,...p];r.port&&!p.includes("--url")&&c.push("--url",String(r.port));let m=0;try{m=await h(c)}catch(v){console.error(` x ${v.message}`),m=1}f.push({file:n,exit:m}),m!==0&&d===0&&(d=m)}if(u.length>1){console.log(`
80
+ maestro summary:`);for(let c of f){let m=c.exit===0?"pass":"fail";console.log(` ${m} ${l.relative(o,c.file)}`)}let n=f.filter(c=>c.exit===0).length;console.log(` ${n}/${f.length} passed`)}return d}export{F as runMaestro};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GWOV6KFE.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HFYLZ5KC.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
3
3
  sootsim preview \u2014 production-like preview
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,c as i,d as t,e as n,f as c}from"./chunk-XKNZR4BB.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function f(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as s,c as i,d as t,e as n,f as c}from"./chunk-WQDITZHE.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";function f(){console.log(`
3
3
  sootsim profile \u2014 manage isolated storage profiles
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function h(){console.log(`
1
+ /*! sootsim v0.1.48 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-DMW52773.js";import"./chunk-2V4MZ2GA.js";import"./chunk-G7F6XU5L.js";import"./chunk-UAVOHNUW.js";import"./chunk-HFYLZ5KC.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage: