sootsim 0.1.123 → 0.1.124

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 (153) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/agent-3VAW5LZD.js +46 -0
  3. package/dist-cli/chunks/{agent-wrapper-N3Y5JUOK.js → agent-wrapper-YCNCH7CG.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-YBLWJSIB.js → app-fonts-BKHY7U6N.js} +2 -2
  5. package/dist-cli/chunks/{assert-7HT2IBPA.js → assert-IJP5E6DT.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-EKA34I25.js +2 -0
  7. package/dist-cli/chunks/beta-DPPCI2ZU.js +2 -0
  8. package/dist-cli/chunks/{chunk-T7JC2PB7.js → chunk-2IT7O7KQ.js} +2 -2
  9. package/dist-cli/chunks/chunk-2JTGXU4D.js +5 -0
  10. package/dist-cli/chunks/{chunk-H2OI6CGN.js → chunk-4YSKSJI3.js} +2 -2
  11. package/dist-cli/chunks/{chunk-PK442VOB.js → chunk-5GVG37QH.js} +2 -2
  12. package/dist-cli/chunks/chunk-66ETIVOD.js +1 -0
  13. package/dist-cli/chunks/{chunk-GKRYL2NS.js → chunk-A5O2QWEB.js} +1 -1
  14. package/dist-cli/chunks/{chunk-JL26L3YO.js → chunk-AUR7DDPB.js} +3 -3
  15. package/dist-cli/chunks/chunk-CA7DYUFF.js +7 -0
  16. package/dist-cli/chunks/{chunk-UJJZU7BD.js → chunk-DCZGWL5K.js} +1 -1
  17. package/dist-cli/chunks/{chunk-2Y24I2A3.js → chunk-DGQN4QFL.js} +1 -1
  18. package/dist-cli/chunks/{chunk-KVM5C2VS.js → chunk-E7GET25R.js} +2 -2
  19. package/dist-cli/chunks/{chunk-HMPB3UOI.js → chunk-EESOIR2B.js} +2 -2
  20. package/dist-cli/chunks/{chunk-L3BNIE26.js → chunk-F4W6VKRG.js} +2 -2
  21. package/dist-cli/chunks/{chunk-DTHU37OI.js → chunk-FPHJY2YU.js} +1 -1
  22. package/dist-cli/chunks/{chunk-7433ONJR.js → chunk-G6G5LYD3.js} +2 -2
  23. package/dist-cli/chunks/{chunk-46GLYZDL.js → chunk-GYK5RCAC.js} +1 -1
  24. package/dist-cli/chunks/{chunk-HIZD6RBT.js → chunk-HQ5JZI67.js} +1 -1
  25. package/dist-cli/chunks/{chunk-EKXKWP2Z.js → chunk-I4F7AUP2.js} +2 -2
  26. package/dist-cli/chunks/{chunk-26R4EYTV.js → chunk-IA347TKV.js} +1 -1
  27. package/dist-cli/chunks/{chunk-2ESPGMYD.js → chunk-J67NC7MV.js} +3 -3
  28. package/dist-cli/chunks/{chunk-ZUGEBK3G.js → chunk-JOEOYLTY.js} +1 -1
  29. package/dist-cli/chunks/chunk-JUX2JKSR.js +2 -0
  30. package/dist-cli/chunks/{chunk-BBEMA3ZH.js → chunk-KBFPZMXJ.js} +2 -2
  31. package/dist-cli/chunks/{chunk-IYAJCTDE.js → chunk-KTRDHNPZ.js} +1 -1
  32. package/dist-cli/chunks/{chunk-M5MHSOH6.js → chunk-KXSJQP6J.js} +2 -2
  33. package/dist-cli/chunks/{chunk-TRWVVERC.js → chunk-LTHY7I3V.js} +1 -1
  34. package/dist-cli/chunks/{chunk-QKYPXERV.js → chunk-NQZCZVNZ.js} +2 -2
  35. package/dist-cli/chunks/{chunk-2MAZ4FWI.js → chunk-OPWN5ZM7.js} +2 -2
  36. package/dist-cli/chunks/{chunk-QNGYCFTQ.js → chunk-PP5QI5FB.js} +1 -1
  37. package/dist-cli/chunks/{chunk-OJB2YYFR.js → chunk-PQZNX54H.js} +2 -2
  38. package/dist-cli/chunks/{chunk-RDS7O4GJ.js → chunk-Q5YWPKAG.js} +2 -2
  39. package/dist-cli/chunks/{chunk-NAQF2ELK.js → chunk-QG4GIDXL.js} +2 -2
  40. package/dist-cli/chunks/{chunk-RM7CKKXW.js → chunk-QTHELIAB.js} +2 -2
  41. package/dist-cli/chunks/{chunk-4554FEPX.js → chunk-R7R5HWAT.js} +2 -2
  42. package/dist-cli/chunks/{chunk-54MYCRSA.js → chunk-RMDVV4YS.js} +1 -1
  43. package/dist-cli/chunks/{chunk-DIH4EEFT.js → chunk-TJLVKZJQ.js} +2 -2
  44. package/dist-cli/chunks/{chunk-QJPILTXK.js → chunk-TJUPANGE.js} +1 -1
  45. package/dist-cli/chunks/{chunk-SORDKCQX.js → chunk-TUZCEXOT.js} +2 -2
  46. package/dist-cli/chunks/chunk-VXRIUP2K.js +1 -0
  47. package/dist-cli/chunks/{chunk-K22QL53C.js → chunk-WH3M4U2P.js} +1 -1
  48. package/dist-cli/chunks/chunk-X5LIH464.js +1 -0
  49. package/dist-cli/chunks/{chunk-DVB53K4R.js → chunk-YFCC2KKG.js} +2 -2
  50. package/dist-cli/chunks/{chunk-CGARJK4O.js → chunk-ZL7STHLD.js} +1 -1
  51. package/dist-cli/chunks/{chunk-7L4XI34A.js → chunk-ZV3W66US.js} +2 -2
  52. package/dist-cli/chunks/cli-version-RTYBGBXB.js +2 -0
  53. package/dist-cli/chunks/{compat-P2M4T3FP.js → compat-AKOAVN2G.js} +3 -3
  54. package/dist-cli/chunks/{config-OVUHUSR7.js → config-GYQK6ZKQ.js} +2 -2
  55. package/dist-cli/chunks/control-HNK3OF2T.js +2 -0
  56. package/dist-cli/chunks/{cpu-profile-LRVI4TNA.js → cpu-profile-TX4QMZZA.js} +2 -2
  57. package/dist-cli/chunks/{daemon-YJCEEAIE.js → daemon-6BDWMPND.js} +24 -24
  58. package/dist-cli/chunks/{debug-PEJA5EWI.js → debug-3EFC6N6J.js} +3 -3
  59. package/dist-cli/chunks/{detox-RUIKZD2M.js → detox-BDBX3YVO.js} +2 -2
  60. package/dist-cli/chunks/{device-HEM3J3BN.js → device-CHHYWWPG.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-SEOCWTHH.js → diagnose-EAXEHFIG.js} +2 -2
  62. package/dist-cli/chunks/drivers-B4PIARZR.js +2 -0
  63. package/dist-cli/chunks/{electron-GIHHLI5F.js → electron-MHB2W6ZP.js} +3 -3
  64. package/dist-cli/chunks/flow-HWDVF2M3.js +2 -0
  65. package/dist-cli/chunks/help-7FMLHEKH.js +2 -0
  66. package/dist-cli/chunks/{hints-GREBRHXF.js → hints-QAKIPTMF.js} +2 -2
  67. package/dist-cli/chunks/home-paths-OD73ST5G.js +2 -0
  68. package/dist-cli/chunks/{inspect-MJ6FVVUA.js → inspect-4SGHZLMG.js} +3 -3
  69. package/dist-cli/chunks/install-WZK6LXM6.js +2 -0
  70. package/dist-cli/chunks/{install-desktop-ECTBYDVD.js → install-desktop-SFPJHT2D.js} +3 -3
  71. package/dist-cli/chunks/{keys-RR42UJM2.js → keys-XQZGTVEZ.js} +2 -2
  72. package/dist-cli/chunks/launch-KG2GSCQV.js +16 -0
  73. package/dist-cli/chunks/{login-P7QGXPYY.js → login-KYT67KEA.js} +4 -4
  74. package/dist-cli/chunks/{logout-KPWM5V3F.js → logout-IBMVZBNN.js} +2 -2
  75. package/dist-cli/chunks/{maestro-BMKSJAVC.js → maestro-YA62KLKO.js} +2 -2
  76. package/dist-cli/chunks/{preview-CXTYD7C3.js → preview-CXH6NIVN.js} +2 -2
  77. package/dist-cli/chunks/{profile-OW36PZ33.js → profile-UVB3AVOS.js} +2 -2
  78. package/dist-cli/chunks/{react-ZP2DMCII.js → react-M2CHY2TY.js} +2 -2
  79. package/dist-cli/chunks/{record-FKZDX7CK.js → record-SZORC67L.js} +2 -2
  80. package/dist-cli/chunks/runtime-PO4BMP3J.js +2 -0
  81. package/dist-cli/chunks/{runtime-delivery-NKEWLU2R.js → runtime-delivery-NBQRZ65J.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-EJ5YY5A4.js → screenshot-I34CN2NI.js} +2 -2
  83. package/dist-cli/chunks/{screenshot-mode-IKPJHCKB.js → screenshot-mode-NQNLKD67.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-5ULGP3TY.js → screenshots-NHQSKU5V.js} +2 -2
  85. package/dist-cli/chunks/{server-PPRG6ISX.js → server-L3UP7BR6.js} +15 -15
  86. package/dist-cli/chunks/setup-repo-GUPYQ2J5.js +2 -0
  87. package/dist-cli/chunks/{skills-WV3ELY6Z.js → skills-ULNZRVS3.js} +2 -2
  88. package/dist-cli/chunks/{start-SGUXXNBN.js → start-G56BRWEF.js} +4 -4
  89. package/dist-cli/chunks/store-WW7XXZNM.js +2 -0
  90. package/dist-cli/chunks/telemetry-3FW6INA6.js +2 -0
  91. package/dist-cli/chunks/{test-Z6JSXZED.js → test-RVKY4RKI.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-HLN2VHIP.js → three-mode-MORULFUD.js} +2 -2
  93. package/dist-cli/chunks/{timeline-NT3K5ZJE.js → timeline-PNE7JILB.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-CA2GU3BM.js → upgrade-XAVE44HP.js} +2 -2
  95. package/dist-cli/chunks/upload-T6JS6GQQ.js +2 -0
  96. package/dist-cli/chunks/{version-LXZYQAKQ.js → version-CXEJDONA.js} +2 -2
  97. package/dist-cli/chunks/{web-UUIWGXRK.js → web-HJUVVLLW.js} +2 -2
  98. package/dist-cli/chunks/{what-happened-RXFF4TUK.js → what-happened-JP3M2RDF.js} +2 -2
  99. package/dist-cli/chunks/{whoami-LBFQTOOY.js → whoami-BCGVUSDW.js} +2 -2
  100. package/dist-lib/agent-daemon-client.cjs +50 -20
  101. package/dist-lib/agent-events.cjs +1 -1
  102. package/dist-lib/agent-sessions.cjs +1 -1
  103. package/dist-lib/attached-projects.cjs +1 -1
  104. package/dist-lib/auth/shared-session.cjs +1 -1
  105. package/dist-lib/backend-origin.cjs +1 -1
  106. package/dist-lib/beta.cjs +1 -1
  107. package/dist-lib/beta.mjs +1 -1
  108. package/dist-lib/bridge-constants.cjs +1 -1
  109. package/dist-lib/cli-constants.cjs +1 -1
  110. package/dist-lib/config.cjs +1 -1
  111. package/dist-lib/detox/index.cjs +1 -1
  112. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  113. package/dist-lib/home-paths.cjs +12 -1
  114. package/dist-lib/host/bridge-host.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  117. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +1 -1
  120. package/dist-lib/metro.cjs +1 -1
  121. package/dist-lib/profiles.cjs +1 -1
  122. package/dist-lib/render-mode.cjs +1 -1
  123. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  124. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  125. package/dist-lib/sdk.cjs +1 -1
  126. package/dist-lib/sdk.mjs +1 -1
  127. package/dist-lib/skills.cjs +1 -1
  128. package/dist-lib/vite.cjs +1 -1
  129. package/package.json +1 -1
  130. package/src/agent-daemon-client.ts +17 -0
  131. package/src/home-paths.ts +26 -0
  132. package/dist-cli/chunks/agent-7UEXHC74.js +0 -46
  133. package/dist-cli/chunks/auto-bootstrap-6QPJNAFZ.js +0 -2
  134. package/dist-cli/chunks/beta-RA5NVED7.js +0 -2
  135. package/dist-cli/chunks/chunk-FEO7LRD4.js +0 -1
  136. package/dist-cli/chunks/chunk-HKEH5FQ2.js +0 -5
  137. package/dist-cli/chunks/chunk-HTZ6H5WJ.js +0 -1
  138. package/dist-cli/chunks/chunk-LVBTKRBM.js +0 -7
  139. package/dist-cli/chunks/chunk-NU6ECUKP.js +0 -2
  140. package/dist-cli/chunks/chunk-TYBEJFWV.js +0 -1
  141. package/dist-cli/chunks/cli-version-67W35P43.js +0 -2
  142. package/dist-cli/chunks/control-G5SOJSPE.js +0 -2
  143. package/dist-cli/chunks/drivers-YYE536KG.js +0 -2
  144. package/dist-cli/chunks/flow-UFIGCF5G.js +0 -2
  145. package/dist-cli/chunks/help-BU77OOJR.js +0 -2
  146. package/dist-cli/chunks/home-paths-Q35ZXJSG.js +0 -2
  147. package/dist-cli/chunks/install-U4MNYWRM.js +0 -2
  148. package/dist-cli/chunks/launch-ZUMBPMS5.js +0 -16
  149. package/dist-cli/chunks/runtime-536W4YEQ.js +0 -2
  150. package/dist-cli/chunks/setup-repo-7I4PUVTB.js +0 -2
  151. package/dist-cli/chunks/store-GOI4SZUQ.js +0 -2
  152. package/dist-cli/chunks/telemetry-MGYSYRR7.js +0 -2
  153. package/dist-cli/chunks/upload-R72LSS66.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{B as T,C as A,D as y,O as _,P as b,Q as S}from"./chunk-QJPILTXK.js";import{c as N,e as F}from"./chunk-7L4XI34A.js";import{b as k}from"./chunk-46GLYZDL.js";import"./chunk-CGARJK4O.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=N(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{B as T,C as A,D as y,O as _,P as b,Q as S}from"./chunk-TJUPANGE.js";import{c as N,e as F}from"./chunk-ZV3W66US.js";import{b as k}from"./chunk-GYK5RCAC.js";import"./chunk-ZL7STHLD.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=N(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
3
3
  sootsim what-happened \u2014 show recent events from the semantic timeline
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as i}from"./chunk-T7JC2PB7.js";import{d as n}from"./chunk-M5MHSOH6.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as i}from"./chunk-2IT7O7KQ.js";import{d as n}from"./chunk-KXSJQP6J.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -44,10 +44,33 @@ var import_node_net = __toESM(require("node:net"), 1);
44
44
  var import_ws = require("ws");
45
45
 
46
46
  // src/agent-sessions.ts
47
- var import_node_fs = __toESM(require("node:fs"), 1);
48
- var import_node_path = __toESM(require("node:path"), 1);
47
+ var import_node_fs2 = __toESM(require("node:fs"), 1);
48
+ var import_node_path2 = __toESM(require("node:path"), 1);
49
49
 
50
50
  // src/home-paths.ts
51
+ var import_node_fs = __toESM(require("node:fs"), 1);
52
+ var import_node_path = __toESM(require("node:path"), 1);
53
+ function isSootsimDevCheckout() {
54
+ if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
55
+ const env = process.env.SOOTSIM_DEV;
56
+ if (env === "1" || env === "true") return true;
57
+ if (env === "0" || env === "false") return false;
58
+ const argv1 = process.argv[1];
59
+ if (!argv1) return false;
60
+ try {
61
+ const real = import_node_fs.default.realpathSync(argv1);
62
+ return real.includes(`${import_node_path.default.sep}packages${import_node_path.default.sep}sootsim${import_node_path.default.sep}`);
63
+ } catch {
64
+ return false;
65
+ }
66
+ }
67
+ function isDevWorkstation() {
68
+ if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
69
+ return process.env.IS_TAMAGUI_DEV === "1";
70
+ }
71
+ function shouldSkipPersistentDaemon() {
72
+ return isSootsimDevCheckout() || isDevWorkstation();
73
+ }
51
74
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
52
75
 
53
76
  // src/attached-projects.ts
@@ -62,11 +85,11 @@ function resolveSootsimInvocation() {
62
85
  const resourcesPath = process.resourcesPath;
63
86
  if (resourcesPath) {
64
87
  const candidates = [
65
- import_node_path.default.join(resourcesPath, "bin", "sootsim"),
66
- import_node_path.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
88
+ import_node_path2.default.join(resourcesPath, "bin", "sootsim"),
89
+ import_node_path2.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
67
90
  ];
68
91
  for (const c of candidates) {
69
- if (import_node_fs.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
92
+ if (import_node_fs2.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
70
93
  }
71
94
  }
72
95
  }
@@ -89,15 +112,15 @@ function tryWorkspaceSootsim() {
89
112
  const sootsimDir = resolveSootsimPackageDir();
90
113
  if (!sootsimDir) return null;
91
114
  const binaryName = `sootsim-${process.platform}-${process.arch}`;
92
- const distBinary = import_node_path.default.join(sootsimDir, "dist-bin", binaryName);
93
- if (import_node_fs.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
94
- const distBin = import_node_path.default.join(sootsimDir, "dist-cli", "bin.js");
95
- if (import_node_fs.default.existsSync(distBin)) {
115
+ const distBinary = import_node_path2.default.join(sootsimDir, "dist-bin", binaryName);
116
+ if (import_node_fs2.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
117
+ const distBin = import_node_path2.default.join(sootsimDir, "dist-cli", "bin.js");
118
+ if (import_node_fs2.default.existsSync(distBin)) {
96
119
  try {
97
- const src = import_node_path.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
98
- if (import_node_fs.default.existsSync(src)) {
99
- const srcMtime = import_node_fs.default.statSync(src).mtimeMs;
100
- const buildMtime = import_node_fs.default.statSync(distBin).mtimeMs;
120
+ const src = import_node_path2.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
121
+ if (import_node_fs2.default.existsSync(src)) {
122
+ const srcMtime = import_node_fs2.default.statSync(src).mtimeMs;
123
+ const buildMtime = import_node_fs2.default.statSync(distBin).mtimeMs;
101
124
  if (buildMtime < srcMtime) {
102
125
  console.warn(
103
126
  `[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).`
@@ -116,22 +139,22 @@ function tryWorkspaceSootsim() {
116
139
  function resolveSootsimPackageDir() {
117
140
  try {
118
141
  const resolved = require.resolve("sootsim/package.json");
119
- return import_node_path.default.dirname(resolved);
142
+ return import_node_path2.default.dirname(resolved);
120
143
  } catch {
121
144
  }
122
145
  const here = fileFromImportMeta();
123
146
  if (!here) return null;
124
- let cur = import_node_path.default.dirname(here);
147
+ let cur = import_node_path2.default.dirname(here);
125
148
  for (let i = 0; i < 8; i++) {
126
- const pkg = import_node_path.default.join(cur, "package.json");
149
+ const pkg = import_node_path2.default.join(cur, "package.json");
127
150
  try {
128
- if (import_node_fs.default.existsSync(pkg)) {
129
- const parsed = JSON.parse(import_node_fs.default.readFileSync(pkg, "utf8"));
151
+ if (import_node_fs2.default.existsSync(pkg)) {
152
+ const parsed = JSON.parse(import_node_fs2.default.readFileSync(pkg, "utf8"));
130
153
  if (parsed.name === "sootsim") return cur;
131
154
  }
132
155
  } catch {
133
156
  }
134
- const parent = import_node_path.default.dirname(cur);
157
+ const parent = import_node_path2.default.dirname(cur);
135
158
  if (parent === cur) break;
136
159
  cur = parent;
137
160
  }
@@ -373,6 +396,13 @@ async function ensureDaemonRunning(opts = {}) {
373
396
  if (await isBridgeUp(port)) {
374
397
  return { alreadyRunning: true };
375
398
  }
399
+ if (shouldSkipPersistentDaemon()) {
400
+ const why = isDevWorkstation() ? `this is a dev workstation (IS_TAMAGUI_DEV=1)` : `this is a dev checkout`;
401
+ throw new AgentDaemonError(
402
+ `no sootsim bridge on port ${port} and refusing to spawn a standalone daemon \u2014 ${why}. start the live \`bun dev\` stack so the bridge is up, or set SOOTSIM_FORCE_DAEMON_INSTALL=1 to spawn one here on purpose.`,
403
+ "DEV_HOST_REFUSED"
404
+ );
405
+ }
376
406
  const { cmd, prefixArgs } = resolveSootsimInvocation();
377
407
  const args = [...prefixArgs, "server", "--quiet"];
378
408
  if (port !== DEFAULT_SOOTSIM_BRIDGE_PORT) {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -52,6 +52,7 @@ __export(home_paths_exports, {
52
52
  electronVersionDir: () => electronVersionDir,
53
53
  ensureSootsimHome: () => ensureSootsimHome,
54
54
  isDaemonLockfileFresh: () => isDaemonLockfileFresh,
55
+ isDevWorkstation: () => isDevWorkstation,
55
56
  isSootsimDevCheckout: () => isSootsimDevCheckout,
56
57
  listInstalledRuntimes: () => listInstalledRuntimes,
57
58
  profilesDir: () => profilesDir,
@@ -62,6 +63,7 @@ __export(home_paths_exports, {
62
63
  removeDaemonLockfile: () => removeDaemonLockfile,
63
64
  runtimeDir: () => runtimeDir,
64
65
  runtimesDir: () => runtimesDir,
66
+ shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
65
67
  sootsimHomeDir: () => sootsimHomeDir,
66
68
  writeActiveRuntime: () => writeActiveRuntime,
67
69
  writeDaemonLockfile: () => writeDaemonLockfile,
@@ -96,6 +98,13 @@ function isSootsimDevCheckout() {
96
98
  return false;
97
99
  }
98
100
  }
101
+ function isDevWorkstation() {
102
+ if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
103
+ return process.env.IS_TAMAGUI_DEV === "1";
104
+ }
105
+ function shouldSkipPersistentDaemon() {
106
+ return isSootsimDevCheckout() || isDevWorkstation();
107
+ }
99
108
  function runtimesDir() {
100
109
  return import_node_path.default.join(sootsimHomeDir(), "runtimes");
101
110
  }
@@ -298,6 +307,7 @@ function removeDaemonLockfile() {
298
307
  electronVersionDir,
299
308
  ensureSootsimHome,
300
309
  isDaemonLockfileFresh,
310
+ isDevWorkstation,
301
311
  isSootsimDevCheckout,
302
312
  listInstalledRuntimes,
303
313
  profilesDir,
@@ -308,6 +318,7 @@ function removeDaemonLockfile() {
308
318
  removeDaemonLockfile,
309
319
  runtimeDir,
310
320
  runtimesDir,
321
+ shouldSkipPersistentDaemon,
311
322
  sootsimHomeDir,
312
323
  writeActiveRuntime,
313
324
  writeDaemonLockfile,
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // cli/commands/inspect/core.ts
4
4
  function resolveMaxMsFlag(args, fallbackMs) {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sootsim",
3
- "version": "0.1.123",
3
+ "version": "0.1.124",
4
4
  "description": "sootsim CLI + vite/metro plugins + skills registry. bridge client for driving the proprietary sootsim-engine over WebSocket.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "MIT",
@@ -15,6 +15,7 @@ import net from 'node:net'
15
15
  import { WebSocket } from 'ws'
16
16
  import { resolveSootsimInvocation, type Provider } from './agent-sessions.ts'
17
17
  import { DEFAULT_SOOTSIM_BRIDGE_PORT } from './bridge-constants.ts'
18
+ import { isDevWorkstation, shouldSkipPersistentDaemon } from './home-paths.ts'
18
19
  import type { AgentEvent } from './agent-events.ts'
19
20
  import type { AgentPromptEnvelope } from './agent-prompt.ts'
20
21
  import type { AgentSession, AttachedProject } from './attached-projects.ts'
@@ -345,6 +346,22 @@ export async function ensureDaemonRunning(
345
346
  if (await isBridgeUp(port)) {
346
347
  return { alreadyRunning: true }
347
348
  }
349
+ // never spawn a standalone daemon on a dev host. on a dev workstation the
350
+ // live `bun dev` stack already owns the bridge in-process; spawning one here
351
+ // lands it on a fallback port serving the published runtime, which shadows
352
+ // the dev build (the :7669 / 0.1.310 footgun). agents must connect to the
353
+ // live bridge, not resurrect a stale one. override: SOOTSIM_FORCE_DAEMON_INSTALL=1.
354
+ if (shouldSkipPersistentDaemon()) {
355
+ const why = isDevWorkstation()
356
+ ? `this is a dev workstation (IS_TAMAGUI_DEV=1)`
357
+ : `this is a dev checkout`
358
+ throw new AgentDaemonError(
359
+ `no sootsim bridge on port ${port} and refusing to spawn a standalone daemon — ${why}. ` +
360
+ `start the live \`bun dev\` stack so the bridge is up, or set ` +
361
+ `SOOTSIM_FORCE_DAEMON_INSTALL=1 to spawn one here on purpose.`,
362
+ 'DEV_HOST_REFUSED',
363
+ )
364
+ }
348
365
  const { cmd, prefixArgs } = resolveSootsimInvocation()
349
366
  const args = [...prefixArgs, 'server', '--quiet']
350
367
  if (port !== DEFAULT_SOOTSIM_BRIDGE_PORT) {
package/src/home-paths.ts CHANGED
@@ -65,6 +65,32 @@ export function isSootsimDevCheckout(): boolean {
65
65
  }
66
66
  }
67
67
 
68
+ // detect the human's dev workstation by the env markers the developer sets in
69
+ // their shell profile (`IS_TAMAGUI_DEV=1` in ~/.zshrc). distinct from
70
+ // isSootsimDevCheckout, which keys on the *binary path*: a globally-installed
71
+ // `sootsim` binary on the dev machine would NOT match the checkout path, yet a
72
+ // persistent daemon registered there is just as dangerous. it runs in the
73
+ // background carrying the workstation's dev env (dev auth tokens, prod-pointing
74
+ // vars), and when the live `bun dev` stack already owns the bridge port it
75
+ // silently lands on a fallback port and shadows the real one with stale assets
76
+ // — the "I was on the daemon on port 7-something" footgun.
77
+ //
78
+ // override: SOOTSIM_FORCE_DAEMON_INSTALL=1 to run the daemon here anyway.
79
+ export function isDevWorkstation(): boolean {
80
+ if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === '1') return false
81
+ return process.env.IS_TAMAGUI_DEV === '1'
82
+ }
83
+
84
+ // the persistent launchd / systemd daemon must never auto-install or run on a
85
+ // dev checkout or a dev workstation. either makes the background agent point at
86
+ // moving workspace artifacts / dev env and serve stale assets that shadow the
87
+ // live dev stack. install, auto-bootstrap, and the launchd-spawned `sootsim
88
+ // server` boot all consult this; a foreground `sootsim server` the dev starts
89
+ // by hand is intentional and stays allowed.
90
+ export function shouldSkipPersistentDaemon(): boolean {
91
+ return isSootsimDevCheckout() || isDevWorkstation()
92
+ }
93
+
68
94
  export function runtimesDir(): string {
69
95
  return path.join(sootsimHomeDir(), 'runtimes')
70
96
  }
@@ -1,46 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as $,b,c as E,d as l,e as A,g as S,h as j,j as T,m as I,n as k,o as x,p as g,q as D,r as O}from"./chunk-RM7CKKXW.js";import"./chunk-54MYCRSA.js";import{c as y}from"./chunk-OJB2YYFR.js";import"./chunk-HMPB3UOI.js";import"./chunk-ZUGEBK3G.js";import"./chunk-NU6ECUKP.js";import"./chunk-CGARJK4O.js";import"./chunk-26R4EYTV.js";import"./chunk-DTHU37OI.js";import"./chunk-K22QL53C.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.js";import w from"node:fs";import d from"node:path";import{spawn as U}from"node:child_process";import _ from"node:net";import{WebSocket as C}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new C(`ws://localhost:${this.port}`),this.ready=new Promise((t,n)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),n(new c(`could not connect to sootsim daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==C.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let n=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(n),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(n,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:n,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(n),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let n=this.pending.get(t.id);n&&(this.pending.delete(t.id),clearTimeout(n.timer),t.error?n.reject(new c(t.error,t.code)):n.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function R(r=7668,e=400){return new Promise(t=>{let n=new _.Socket,s=!1,o=i=>{s||(s=!0,n.destroy(),t(i))};n.setTimeout(e),n.once("connect",()=>o(!0)),n.once("timeout",()=>o(!1)),n.once("error",()=>o(!1)),n.connect(r,"127.0.0.1")})}async function F(r={}){let e=r.port??7668;if(await R(e))return{alreadyRunning:!0};let{cmd:t,prefixArgs:n}=O(),s=[...n,"server","--quiet"];e!==7668&&s.push("--port",String(e));let o=U(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(r.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await R(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned sootsim daemon on port ${e} but it did not come up in time. run \`sootsim server\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(r={}){await F({port:r.port,startupTimeoutMs:r.startupTimeoutMs});let e=new f(r);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function me(r){let[e,...t]=r;try{switch(e){case void 0:case"--help":case"-h":case"help":return M(),0;case"attach":return await B(t);case"projects":return await W();case"project":return await J(t);case"sessions":return await V(t);case"start":return await G(t);case"prompt":return await H(t);case"watch":return await q(t);case"transcript":return await X(t);case"end":return await z(t);case"paths":return await Q();default:return process.stderr.write(`unknown agent subcommand: ${e}
3
- `),M(),2}}catch(n){if(n instanceof c)return process.stderr.write(`${n.message}
4
- `),1;throw n}}async function v(r){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await r(e)}finally{e.close()}}function M(){y("agent")}function P(r,e){let t={},n=[];for(let s=0;s<r.length;s++){let o=r[s],i=e[o];i==="value"?(t[o]=r[s+1]??"",s++):i==="bool"?t[o]=!0:n.push(o)}return{flags:t,positional:n}}function N(r,e="codex"){return r==="codex"||r==="claude"?r:e}async function B(r){let{flags:e,positional:t}=P(r,{"--name":"value","--provider":"value"}),n=t[0];if(!n)return process.stderr.write(`usage: sootsim agent attach <dir> [--name X] [--provider codex|claude]
5
- `),2;let s=d.resolve(n);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
6
- `),1;let o=E({cwd:s,name:e["--name"]||d.basename(s),preferredProvider:N(e["--provider"]),sourceRoots:[s]});return process.stdout.write(`\u2713 attached "${o.name}" (id: ${o.id})
7
- cwd: ${o.cwd}
8
- framework: ${o.framework}
9
- preferred provider: ${o.preferredProvider}
10
- `),0}async function W(){let r=[...A()].sort((t,n)=>n.updatedAt-t.updatedAt);if(r.length===0)return process.stdout.write("no attached projects yet. try `sootsim agent attach <dir>`.\n"),0;let e=`${"ID".padEnd(18)} ${"NAME".padEnd(20)} ${"FRAMEWORK".padEnd(10)} ${"PROVIDER".padEnd(8)} ${"7D COST".padEnd(10)} CWD
11
- `;process.stdout.write(e);for(let t of r){let n=S(t),s=n>0?`$${n.toFixed(2)}`:"\u2014";process.stdout.write(`${t.id.padEnd(18)} ${p(t.name,20).padEnd(20)} ${t.framework.padEnd(10)} ${t.preferredProvider.padEnd(8)} ${s.padEnd(10)} ${t.cwd}
12
- `)}return 0}async function J(r){let[e,t]=r;if(e==="show"){if(!t)return process.stderr.write(`usage: sootsim agent project show <id>
13
- `),2;let n=l(t);return n?(process.stdout.write(JSON.stringify(n,null,2)+`
14
- `),0):(process.stderr.write(`no project with id=${t}
15
- `),1)}return e==="remove"?t?(j(t),process.stdout.write(`\u2713 removed project ${t}
16
- `),0):(process.stderr.write(`usage: sootsim agent project remove <id>
17
- `),2):(process.stderr.write(`usage: sootsim agent project [show|remove] <id>
18
- `),2)}async function V(r){let{flags:e}=P(r,{"--project":"value","--all":"bool"}),t=e["--project"]||void 0,n=e["--all"]===!0,s=T(t);if(n||(s=s.filter(i=>i.status!=="ended")),s=s.sort((i,a)=>a.lastSeenAt-i.lastSeenAt),s.length===0)return process.stdout.write(n?`no sessions.
19
- `:`no active sessions. pass --all to include ended.
20
- `),0;let o=`${"SESSION".padEnd(26)} ${"PROJECT".padEnd(18)} ${"PROVIDER".padEnd(8)} ${"STATUS".padEnd(16)} ${"ALIVE".padEnd(5)} LAST PROMPT
21
- `;process.stdout.write(o);for(let i of s){let a=D(i.wrapperPid,i.id)?"yes":"no",m=i.lastPrompt?p(i.lastPrompt,40):"";process.stdout.write(`${L(i.id).padEnd(26)} ${L(i.projectId).padEnd(18)} ${i.provider.padEnd(8)} ${i.status.padEnd(16)} ${a.padEnd(5)} ${m}
22
- `)}return 0}async function G(r){let{flags:e,positional:t}=P(r,{"--provider":"value","--codex-bin":"value","--claude-bin":"value","--fresh-thread":"bool"}),n=t[0];if(!n)return process.stderr.write(`usage: sootsim agent start <projectId> [--provider codex|claude] [--fresh-thread]
23
- `),2;let s=await v(i=>i.startSession({projectId:n,provider:N(e["--provider"],void 0)||void 0,codexBin:e["--codex-bin"]||void 0,claudeBin:e["--claude-bin"]||void 0,freshThread:e["--fresh-thread"]===!0})),o=l(s.session.projectId);return process.stdout.write(`\u2713 session ${s.session.id} started
24
- project: ${o.name} (${o.id})
25
- provider: ${s.session.provider}
26
- pid: ${s.wrapperPid}
27
- prompt with: sootsim agent prompt ${s.session.id} "<text>"
28
- watch events: sootsim agent watch ${s.session.id}
29
- `),0}async function H(r){let[e,...t]=r,n=t.join(" ");return!e||!n?(process.stderr.write(`usage: sootsim agent prompt <sessionId> "<text>"
30
- `),2):(await v(s=>s.sendPrompt(e,{text:n})),process.stdout.write(`\u2713 prompt sent to ${e}
31
- `),0)}async function q(r){let e=r[0];if(!e)return process.stderr.write(`usage: sootsim agent watch <sessionId>
32
- `),2;process.stdout.write(`watching ${e}
33
- ---
34
- `);let t=await h({clientLabel:"sootsim-agent-watch"}),n,s=new Promise(a=>{n=a}),o=t.onAgentEvent(({sessionId:a,event:m})=>{a===e&&process.stdout.write(K(m)+`
35
- `)}),i=t.onDisconnect(()=>{process.stderr.write(`
36
- [sootsim] daemon disconnected; exiting watch.
37
- `),n(1)});try{await t.subscribeEvents(e)}catch(a){throw o(),i(),t.close(),a}return process.on("SIGINT",()=>{o(),i(),t.unsubscribeEvents(e).catch(()=>{}),t.close(),n(130)}),s}function K(r){let e=Y(r.ts);switch(r.type){case"ready":return`[${e}] ready ${r.provider} @ ${r.cwd}`;case"prompt-received":return`[${e}] prompt "${p(r.text,120)}"`;case"turn-started":return`[${e}] turn-started ${r.turnId??""}`;case"turn-message":return`[${e}] turn-message ${r.delta.replace(/\s+$/,"")}`;case"turn-reasoning":return`[${e}] turn-reasoning ${p(r.delta,200)}`;case"tool-call":return`[${e}] tool-call ${r.name}`;case"file-edited":return`[${e}] file-edited ${r.kind.padEnd(6)} ${r.path}`;case"turn-completed":return`[${e}] turn-completed ${r.durationMs}ms files=${r.filesTouched.length}`;case"approval-needed":return`[${e}] approval ${r.kind}`;case"error":return`[${e}] error ${r.message}`;case"exited":return`[${e}] exited code=${r.code}`;case"file-diff-delta":return`[${e}] file-diff-delta ${r.path}`;case"turn-plan":return`[${e}] turn-plan steps=${r.steps.length}`;default:return`[${e}] ${r.type}`}}async function X(r){let e=r[0];if(!e)return process.stderr.write(`usage: sootsim agent transcript <sessionId>
38
- `),2;let t=g(e);return w.existsSync(t)?(process.stdout.write(w.readFileSync(t,"utf8")),0):(process.stderr.write(`transcript not found: ${t}
39
- `),1)}async function z(r){let e=r[0];return e?(await v(t=>t.endSession(e)),process.stdout.write(`\u2713 ended session ${e}
40
- `),0):(process.stderr.write(`usage: sootsim agent end <sessionId>
41
- `),2)}async function Q(){let r=b();return process.stdout.write(`userData: ${r}
42
- state: ${d.join(r,"attached-projects.json")}
43
- sessions: ${d.join(r,"sessions")}
44
- transcripts: ${d.join(r,"transcripts")}
45
- locks: ${d.join(r,"locks")}
46
- `),0}function p(r,e){return r.length<=e?r:r.slice(0,e-1)+"\u2026"}function L(r){return r.length>14?`${r.slice(0,14)}\u2026`:r}function Y(r){return new Date(r).toISOString().replace("T"," ").slice(0,19)}var le={sessionDir:I,promptFifoPath:k,eventsFifoPath:x,transcriptPath:g,parseAgentEventLine:$};export{le as __internals,me as runAgentCommand};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-LVBTKRBM.js";import"./chunk-7L4XI34A.js";import"./chunk-46GLYZDL.js";import"./chunk-CGARJK4O.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e}from"./chunk-DTHU37OI.js";import"./chunk-IYAJCTDE.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,5 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import r from"node:fs";import{homedir as O}from"node:os";import n from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",j="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?n.resolve(e):n.join(O(),".sootsim")}function K(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${n.sep}packages${n.sep}sootsim${n.sep}`)}catch{return!1}}function f(){return n.join(c(),"runtimes")}function _(e){return n.join(f(),e)}function D(){return n.join(f(),E)}function S(){return n.join(c(),"electron")}function U(){return n.join(S(),"userData")}function Y(e){return n.join(S(),e)}function N(){return n.join(c(),"profiles")}function F(){return n.join(c(),"daemon-app")}function T(){return n.join(F(),"SootSim Daemon.app")}function G(){return n.join(T(),"Contents","MacOS","sootsim-daemon")}function C(){return n.join(c(),"cache")}function p(){return n.join(c(),A)}function d(){return n.join(c(),j)}function v(){try{let e=r.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function M(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return r.writeFileSync(u,`${JSON.stringify(s,null,2)}
3
- `,"utf8"),r.renameSync(u,d()),s}function X(){return v().telemetry!==!1}function q(e){M({telemetry:e})}function y(){r.mkdirSync(c(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(S(),{recursive:!0}),r.mkdirSync(N(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0})}function w(){try{let e=r.readFileSync(D(),"utf8").trim();return e.length>0?e:null}catch{return null}}function z(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(D(),`${e}
4
- `,"utf8")}function Q(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(P)}catch{return[]}}function P(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,k=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,k]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function W(){let e=w();if(!e)return null;let t=_(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var h=16*1024;function R(){try{let e=r.openSync(p(),"r");try{let t=Buffer.alloc(h),s=r.readSync(e,t,0,h,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{r.closeSync(e)}}catch{return null}}function $(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function H(e){y();let t=`${p()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
5
- `,"utf8"),r.renameSync(t,p())}function Z(e){y();let t=R();return t&&$(t)&&t.pid!==e.pid?!1:(H(e),!0)}function ee(){try{r.unlinkSync(p())}catch{}}export{L as a,E as b,A as c,j as d,I as e,c as f,K as g,f as h,_ as i,D as j,S as k,U as l,Y as m,N as n,F as o,T as p,G as q,C as r,p as s,d as t,v as u,M as v,X as w,q as x,y,w as z,z as A,Q as B,P as C,W as D,R as E,$ as F,H as G,Z as H,ee as I};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,7 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-7L4XI34A.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-HKEH5FQ2.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-536W4YEQ.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
3
- dev checkouts skip the auto-install of the persistent launchd / systemd
4
- agent. start the daemon manually in another shell with:
5
- bun sootsim server
6
- (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-YJCEEAIE.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
7
- if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t="http://localhost:5173/";export{t as a};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-26R4EYTV.js";import"./chunk-IYAJCTDE.js";export{a as getCliVersion};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (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,q as n,r as o,s as p,t as q,u as r,v as s}from"./chunk-BBEMA3ZH.js";import"./chunk-SORDKCQX.js";import"./chunk-7433ONJR.js";import"./chunk-QJPILTXK.js";import"./chunk-TRWVVERC.js";import"./chunk-7L4XI34A.js";import"./chunk-QKYPXERV.js";import"./chunk-GKRYL2NS.js";import"./chunk-HTZ6H5WJ.js";import"./chunk-4554FEPX.js";import"./chunk-UJJZU7BD.js";import"./chunk-46GLYZDL.js";import"./chunk-NU6ECUKP.js";import"./chunk-CGARJK4O.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.js";export{e as buildOpenUrl,d as buildShellUrl,q as closeSimsBulk,r as planBulkCloseTargets,i as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,p as runClaimCommand,s as runCloseCommand,o as runFocusCommand,l as runListCommand,m as runOpenCommand,n as runUseCommand,j as signalDriverLaunchConnected,f as summarizeSimUrl,k as terminatePlaywrightHostsForSims,h as waitForSimMatch};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.123 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-FEO7LRD4.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-QKYPXERV.js";import"./chunk-GKRYL2NS.js";import"./chunk-HTZ6H5WJ.js";import"./chunk-4554FEPX.js";import"./chunk-UJJZU7BD.js";import"./chunk-46GLYZDL.js";import"./chunk-HKEH5FQ2.js";import"./chunk-IYAJCTDE.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};