sootsim 0.0.2 → 0.0.4
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.
- package/dist-cli/bin.js +7 -7
- package/dist-cli/chunks/{agent-3T4BJEZM.js → agent-PJAOF4JS.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-WCYNLWHZ.js → agent-wrapper-STO7PLQD.js} +2 -2
- package/dist-cli/chunks/{assert-FPFJEFF3.js → assert-P47NW4AF.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-SC2LMI2H.js +2 -0
- package/dist-cli/chunks/{chunk-KZ2LIDW6.js → chunk-432TMHBG.js} +1 -1
- package/dist-cli/chunks/{chunk-6IPY24VM.js → chunk-47S5DXXX.js} +3 -3
- package/dist-cli/chunks/{chunk-DW54UPRZ.js → chunk-4VXB2DBA.js} +1 -1
- package/dist-cli/chunks/{chunk-ET3NNZAR.js → chunk-4XBPZQLW.js} +2 -2
- package/dist-cli/chunks/{chunk-TGDP3D3V.js → chunk-5TTQKPGH.js} +1 -1
- package/dist-cli/chunks/{chunk-RJUBGX5M.js → chunk-6SZMLFCR.js} +1 -1
- package/dist-cli/chunks/{chunk-LOV766MI.js → chunk-AFQBSK2J.js} +1 -1
- package/dist-cli/chunks/{chunk-CZZB4DWG.js → chunk-AUR2LTNX.js} +2 -2
- package/dist-cli/chunks/{chunk-SLCVEGTW.js → chunk-BQRM4E66.js} +2 -2
- package/dist-cli/chunks/chunk-C3QLIYCS.js +16 -0
- package/dist-cli/chunks/{chunk-5C5I5OFM.js → chunk-DQKQYPIG.js} +2 -2
- package/dist-cli/chunks/{chunk-ISAMAM3I.js → chunk-EHMSE3Q3.js} +1 -1
- package/dist-cli/chunks/chunk-F4ARVCRR.js +1 -0
- package/dist-cli/chunks/chunk-HAKR72LJ.js +2 -0
- package/dist-cli/chunks/chunk-HGFIS26A.js +2 -0
- package/dist-cli/chunks/{chunk-EWMYTXM2.js → chunk-I6XGFZPA.js} +2 -2
- package/dist-cli/chunks/{chunk-4372UQHZ.js → chunk-MQDPKSCK.js} +3 -3
- package/dist-cli/chunks/chunk-MZPAJ5PQ.js +1 -0
- package/dist-cli/chunks/{chunk-AS4V7TZU.js → chunk-OAHMYSMD.js} +1 -1
- package/dist-cli/chunks/{chunk-EWEKADK4.js → chunk-QIP7LYQI.js} +2 -2
- package/dist-cli/chunks/{chunk-NHA3G6A3.js → chunk-QQOBLF7O.js} +2 -2
- package/dist-cli/chunks/{chunk-B5R4K2DG.js → chunk-SY74J6F4.js} +1 -1
- package/dist-cli/chunks/{chunk-NE62JSI6.js → chunk-UKYK63H6.js} +1 -1
- package/dist-cli/chunks/{chunk-GQUOQNTP.js → chunk-UNFERMZ3.js} +2 -2
- package/dist-cli/chunks/{chunk-HORCHQT7.js → chunk-UQ3N6FZF.js} +2 -2
- package/dist-cli/chunks/{chunk-K6YUSCAC.js → chunk-VGXARPIH.js} +2 -2
- package/dist-cli/chunks/{chunk-TSZBQS6W.js → chunk-W3TYN64D.js} +2 -2
- package/dist-cli/chunks/{chunk-XXUAOYYT.js → chunk-W7CYWXRZ.js} +1 -1
- package/dist-cli/chunks/{chunk-CXTA5VGA.js → chunk-WRF43M33.js} +1 -1
- package/dist-cli/chunks/{chunk-LXCFGKL2.js → chunk-WVBPATRA.js} +1 -1
- package/dist-cli/chunks/{chunk-K7LDP7JL.js → chunk-WWDJCKMI.js} +1 -1
- package/dist-cli/chunks/{chunk-HBNVKYSC.js → chunk-XJF46GU2.js} +2 -2
- package/dist-cli/chunks/{chunk-YVSZHVLU.js → chunk-ZF5FCFLD.js} +2 -2
- package/dist-cli/chunks/chunk-ZKNI5MRD.js +1 -0
- package/dist-cli/chunks/{compat-3HMKLGXL.js → compat-ILLJ7VDL.js} +2 -2
- package/dist-cli/chunks/{config-IJQ3KANN.js → config-CDIAJIIT.js} +2 -2
- package/dist-cli/chunks/control-7QGKUCAX.js +2 -0
- package/dist-cli/chunks/{daemon-BBEQJLRY.js → daemon-4BLYGM5N.js} +2 -2
- package/dist-cli/chunks/{debug-SGZ5ZFQI.js → debug-6SMCTPMC.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-HLI5UGGI.js +2 -0
- package/dist-cli/chunks/{detox-PK74V2Y7.js → detox-R4G5INNB.js} +2 -2
- package/dist-cli/chunks/{device-MWNFX54L.js → device-YSLCWS4E.js} +2 -2
- package/dist-cli/chunks/drivers-YIXRFFBQ.js +2 -0
- package/dist-cli/chunks/{electron-3NIHSU2K.js → electron-JZOFO37G.js} +3 -3
- package/dist-cli/chunks/flow-L7X5FGIN.js +2 -0
- package/dist-cli/chunks/{hints-XZJLBIXW.js → hints-O4QR6UGI.js} +2 -2
- package/dist-cli/chunks/{home-paths-BNRMUBJA.js → home-paths-4YJJYGR6.js} +2 -2
- package/dist-cli/chunks/{inspect-FGTUAK4C.js → inspect-DRFAUJUH.js} +29 -29
- package/dist-cli/chunks/{install-LCXALH26.js → install-BATRTWRI.js} +2 -2
- package/dist-cli/chunks/{install-desktop-U3RQ6XUX.js → install-desktop-6X474IQ3.js} +2 -2
- package/dist-cli/chunks/{install-dev-desktop-BLKRFI42.js → install-dev-desktop-CAJHPRNP.js} +2 -2
- package/dist-cli/chunks/{keys-N5LBDSD5.js → keys-OWQ7SOTM.js} +2 -2
- package/dist-cli/chunks/{launch-NIMSJH5I.js → launch-WUEDHSO5.js} +3 -3
- package/dist-cli/chunks/{login-CQV2XBRM.js → login-54YJ2KH6.js} +2 -2
- package/dist-cli/chunks/{logout-R56NWAWQ.js → logout-XECXLEXW.js} +2 -2
- package/dist-cli/chunks/{maestro-ZYUVTM7H.js → maestro-PMHK6EHI.js} +2 -2
- package/dist-cli/chunks/{preview-AOAWAYEQ.js → preview-4RVHA2PP.js} +2 -2
- package/dist-cli/chunks/{profile-DDADDPRW.js → profile-3IVNHUS6.js} +2 -2
- package/dist-cli/chunks/{record-3OIOTHP6.js → record-KEWLM5JR.js} +2 -2
- package/dist-cli/chunks/{runtime-JTLZYEXK.js → runtime-PJKHEB36.js} +3 -3
- package/dist-cli/chunks/{screenshot-Q6N2V5LL.js → screenshot-BXRAQERZ.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-WWLWJWQD.js → screenshot-mode-5IXEDIUS.js} +2 -2
- package/dist-cli/chunks/{screenshots-2JEPJGZO.js → screenshots-T4MQF3TB.js} +2 -2
- package/dist-cli/chunks/{server-VH34RVAX.js → server-CIP3LH45.js} +2 -2
- package/dist-cli/chunks/{skills-PU4627FY.js → skills-DJA6QEVR.js} +2 -2
- package/dist-cli/chunks/store-SPC247DB.js +2 -0
- package/dist-cli/chunks/{test-AECE56E7.js → test-IWUHNFXV.js} +3 -3
- package/dist-cli/chunks/upload-UPD2RSYF.js +2 -0
- package/dist-cli/chunks/{whoami-NCGRRR7X.js → whoami-MCXFWKIH.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-HDW6N77H.js +0 -2
- package/dist-cli/chunks/chunk-3HBBSRLE.js +0 -2
- package/dist-cli/chunks/chunk-4GWEO5CL.js +0 -1
- package/dist-cli/chunks/chunk-EIZCWDRE.js +0 -1
- package/dist-cli/chunks/chunk-FUQ4XA6I.js +0 -16
- package/dist-cli/chunks/chunk-NXWCDGWS.js +0 -2
- package/dist-cli/chunks/chunk-XKDQEYTE.js +0 -1
- package/dist-cli/chunks/control-3RAFI4AW.js +0 -2
- package/dist-cli/chunks/demo-app-registry-NCYP3WA6.js +0 -2
- package/dist-cli/chunks/drivers-EXUREU4B.js +0 -2
- package/dist-cli/chunks/flow-6Y3E6E5P.js +0 -2
- package/dist-cli/chunks/store-U2VDD2S4.js +0 -2
- package/dist-cli/chunks/upload-KPP7KG6E.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import{c,e as i,h as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c,e as i,h as d}from"./chunk-C3QLIYCS.js";import"./chunk-W7CYWXRZ.js";import"./chunk-MZPAJ5PQ.js";import"./chunk-WRF43M33.js";import"./chunk-WWDJCKMI.js";async function g(o,l){(o.includes("--help")||o.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import{c as Y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as Y}from"./chunk-MQDPKSCK.js";import"./chunk-QIP7LYQI.js";import"./chunk-UNFERMZ3.js";import{b as j}from"./chunk-DQKQYPIG.js";import"./chunk-ZKNI5MRD.js";import"./chunk-QQOBLF7O.js";import"./chunk-W3TYN64D.js";import"./chunk-AUR2LTNX.js";import"./chunk-UKYK63H6.js";import"./chunk-4XBPZQLW.js";import"./chunk-XJF46GU2.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-EHMSE3Q3.js";import{b as O}from"./chunk-I6XGFZPA.js";import"./chunk-47S5DXXX.js";import"./chunk-OAHMYSMD.js";import"./chunk-5TTQKPGH.js";import"./chunk-WVBPATRA.js";import"./chunk-HGFIS26A.js";import"./chunk-C3QLIYCS.js";import"./chunk-W7CYWXRZ.js";import"./chunk-MZPAJ5PQ.js";import"./chunk-WRF43M33.js";import"./chunk-ZF5FCFLD.js";import"./chunk-SY74J6F4.js";import"./chunk-WWDJCKMI.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let r=ee(e),i=Math.max(0,Math.min(1,t)),n=r.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],o=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${o}, ${a}, ${u}, ${i})`}return r.startsWith("rgb(")?r.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):r}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,r=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${r})`}function oe(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(r=>r.trim()).filter(r=>r.length>0&&r!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),r=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${r}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function re(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(o,a,u)=>{let p=Math.round(t.width*.68*(a.scale??o.scale)),l=Math.round(t.height*(.03+o.offsetY+(a.offsetY??0))),c=a.pose||o.pose||"tilted-right",m=R(o.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(o,a,u)=>{let p=Math.round(t.width*.84*(a.scale??o.scale)),l=Math.round(t.height*(o.offsetY+(a.offsetY??0))),c=a.pose||o.pose,m=R(o.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let r=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${r}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,o)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,o);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:r,imageDataUrl:i}){let n=r.background??t.background,s=re(t.text.preset,e),o=t.text.preset!=="none"&&!!(r.eyebrow||r.headline||r.subheadline),a=s.deviceStyle(t.frame,r,n),u=r.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(r.headline)}</div>`:"",p=r.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(r.subheadline)}</div>`:"",l=r.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(r.eyebrow)}</div></div>`:"";return`<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import{b as U,c as R,d as K,e as N,f as J,h as q,i as w,j as G,k as V,l as z,p as Y,s as b,t as Z,u as Q,v as X,w as ee}from"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as U,c as R,d as K,e as N,f as J,h as q,i as w,j as G,k as V,l as z,p as Y,s as b,t as Z,u as Q,v as X,w as ee}from"./chunk-BQRM4E66.js";import"./chunk-432TMHBG.js";import{a as $}from"./chunk-QIP7LYQI.js";import"./chunk-QQOBLF7O.js";import"./chunk-OAHMYSMD.js";import"./chunk-MZPAJ5PQ.js";import{o as A,p as D,q as _,r as L,t as M,u as W,v as F,w as j,x as H,y as O}from"./chunk-WRF43M33.js";import"./chunk-WWDJCKMI.js";import{spawn as T}from"child_process";import v from"fs";import{createServer as ae}from"http";import y from"path";import{WebSocket as f,WebSocketServer as ce}from"ws";import te from"node:fs";import C from"node:path";var E=1;function ne(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(h=>Number.isFinite(h)&&h>0)}var P=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let r of t)this.decrementSubscription(r);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let r=t?.type;if(typeof r!="string"||!r.startsWith("agent:"))return!1;let o=t.id;try{let s=await this.dispatch(e,r,t);this.respond(e,o,s)}catch(s){s instanceof b?this.respondError(e,o,s.message,s.code):this.respondError(e,o,s instanceof Error?s.message:String(s))}return!0}async seedOnBoot(){try{await z()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
|
|
3
3
|
`)}}close(){for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,r){switch(t){case"agent:list-projects":return N();case"agent:upsert-project":return R(r.input??{});case"agent:delete-project":return q(String(r.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(r.input??{});case"agent:list-sessions":return G(r.projectId?String(r.projectId):void 0);case"agent:start-session":return this.doStartSession(r.input??{});case"agent:send-prompt":{let s=String(r.sessionId),n=w(s);if(!n)throw new b("NO_SESSION",`no session: ${s}`);let i=this.normalizePromptEnvelope(r);return await Q(s,i),this.notePromptAccepted(s,i,n.status==="working")}case"agent:end-session":this.dropSessionFanout(String(r.sessionId)),await X(String(r.sessionId));let o=w(String(r.sessionId));return o&&this.broadcastSessionStatus(o),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(r.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(r.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(r.sessionId));default:throw new b("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async doStartSession(e){if(!K(e.projectId))throw new b("NO_PROJECT",`no project: ${e.projectId}`);let r=await Z(e);return this.broadcastSessionStatus(r.session),r}async autoAttachForUrl(e){let t=e.bundleUrl??"",r=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!r)return{project:null};let o=this.opts.getExcludePorts?.()??ne(),n=(await $({excludePorts:o})).find(d=>String(d.port)===r);if(!n||!n.cwd)return{project:null};let i=N().find(d=>d.cwd===n.cwd)??null,a=Array.from(new Set([...i?.knownBundleUrls??[],n.bundleUrl,t]));return{project:R({cwd:n.cwd,name:n.projectName??C.basename(n.cwd),preferredProvider:e.provider??i?.preferredProvider,sourceRoots:i?.sourceRoots??[n.cwd],knownBundleUrls:a,framework:i?.framework??oe(n.framework),bundleId:n.bundleId??i?.bundleId})}}getTranscript(e){let t=Y(e);return te.existsSync(t)?te.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=U();return{userDataDir:e,storeFile:C.join(e,"attached-projects.json"),sessionsDir:C.join(e,"sessions"),transcriptsDir:C.join(e,"transcripts")}}subscribeSocket(e,t){let r=this.sessionsBySocket.get(e);if(r||(r=new Set,this.sessionsBySocket.set(e,r)),r.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};r.add(t);let o=this.subscriptions.get(t);if(o)return o.refCount++,{ok:!0,refCount:o.refCount};let s=ee(t,n=>{let i=this.coalescePromptEcho(t,n);if(i&&(this.applySessionEvent(t,i),this.fanOutEvent(t,i)),n.type==="turn-completed"){let a=w(t);if(a)try{J(a.projectId,{usd:n.costUsd,ts:n.ts})}catch(c){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${c instanceof Error?c.message:String(c)}
|
|
4
4
|
`)}}});return this.subscriptions.set(t,{unsubscribe:s,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let r=this.sessionsBySocket.get(e);return!r||!r.has(t)?{ok:!0,refCount:0}:(r.delete(t),this.decrementSubscription(t))}decrementSubscription(e){let t=this.subscriptions.get(e);if(!t)return{ok:!0,refCount:0};if(t.refCount--,t.refCount<=0){try{t.unsubscribe()}catch{}return this.subscriptions.delete(e),{ok:!0,refCount:0}}return{ok:!0,refCount:t.refCount}}dropSessionFanout(e){let t=this.subscriptions.get(e);if(t){try{t.unsubscribe()}catch{}this.subscriptions.delete(e)}for(let r of this.sessionsBySocket.values())r.delete(e);this.clearPromptTracking(e)}normalizePromptEnvelope(e){if(e?.prompt&&typeof e.prompt=="object"){let t=e.prompt;return{text:String(t.text??""),...typeof t.displayText=="string"?{displayText:t.displayText}:{},...typeof t.inspectSummary=="string"?{inspectSummary:t.inspectSummary}:{},...typeof t.inspectTrace=="string"?{inspectTrace:t.inspectTrace}:{}}}return{text:String(e?.text??""),...typeof e?.displayText=="string"?{displayText:e.displayText}:{},...typeof e?.inspectSummary=="string"?{inspectSummary:e.inspectSummary}:{},...typeof e?.inspectTrace=="string"?{inspectTrace:e.inspectTrace}:{}}}notePromptAccepted(e,t,r){let o=Date.now(),s=this.pendingPromptEchoes.get(e)??[];s.push({sentAt:o}),this.pendingPromptEchoes.set(e,s);let n=Math.max(this.pendingTurns.get(e)??0,r?1:0)+1;this.pendingTurns.set(e,n);let i=t.displayText??t.text;return this.patchSession(e,{lastPrompt:i,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:i,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:o}),{ok:!0,queued:n>1,pendingTurns:n,queueDepth:Math.max(0,n-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let r=this.consumeSettledTurn(e);this.patchSession(e,{status:r>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let r=this.consumeSettledTurn(e);this.patchSession(e,{status:r>0?"working":"needs-attention",needsAttention:r<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){V(e,t);let r=w(e);r&&this.broadcastSessionStatus(r)}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let r=this.pendingPromptEchoes.get(e);if(!r||r.length===0)return t;for(;r.length>0&&Date.now()-r[0].sentAt>15e3;)r.shift();return r.length===0?(this.pendingPromptEchoes.delete(e),t):(r.shift(),r.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,r),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let r=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[o,s]of this.sessionsBySocket)if(s.has(e)&&o.readyState===E)try{o.send(r)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let r of this.allSockets)if(r.readyState===E)try{r.send(t)}catch{}}respond(e,t,r){if(e.readyState===E)try{e.send(JSON.stringify({id:t,result:r}))}catch{}}respondError(e,t,r,o){if(e.readyState===E)try{e.send(JSON.stringify({id:t,error:r,...o?{code:o}:{}}))}catch{}}};function oe(h){return h==="expo"?"expo":h==="one"||h==="vxrn"?"one":"unknown"}var de=new Set(["tap","keyboard","close"]);function le(h){return!h||typeof h.type!="string"?!1:h.acquireLock===!0?!0:h.readOnly===!0?!1:de.has(h.type)}var ue=5e3,pe={".html":"text/html; charset=utf-8",".js":"application/javascript",".cjs":"application/javascript",".mjs":"application/javascript",".css":"text/css; charset=utf-8",".json":"application/json; charset=utf-8",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".wasm":"application/wasm",".ttf":"font/ttf",".otf":"font/otf",".woff":"font/woff",".woff2":"font/woff2",".map":"application/json",".txt":"text/plain; charset=utf-8"},I=class h{port;openUrlHandler;httpServer=null;wss=null;nextCommandId=1;nextBrowserId=1;browsers=new Map;primaryBrowserId=null;pendingCommands=new Map;cliBySentId=new Map;cliBrowserBySocket=new Map;cliLastCommandAt=new Map;cliSessionKeyBySocket=new Map;cliLabelBySocket=new Map;restorableBrowsers=new Map;nextCliFallbackId=1;cliIdleTimer=null;agentHost;static CLI_IDLE_TIMEOUT_MS=6e4;static CLI_LEASE_TTL_MS=6e5;static USER_ACTIVE_LEASE_TTL_MS=8e3;static BROWSER_RECONNECT_TTL_MS=3e4;preferredPort;portFallbackCount;shouldWriteLockfile;effectivePort=0;startedAt=0;heartbeatTimer=null;activeRuntimeVersion=null;activeRuntimeDirPath=null;constructor(e={}){this.preferredPort=e.port||7668,this.port=this.preferredPort,this.shouldWriteLockfile=e.writeLockfile===!0;let t=this.shouldWriteLockfile?1:10;this.portFallbackCount=Math.max(1,e.portFallbackCount??t),this.openUrlHandler=e.openUrl,this.agentHost=new P({getExcludePorts:e.agentScanExcludes})}getAgentHost(){return this.agentHost}start(e){this.startAsync(e)}async startAsync(e){if(this.httpServer||this.wss)return this.effectivePort;this.refreshActiveRuntime();for(let t=0;t<this.portFallbackCount;t++){let r=this.preferredPort+t;try{return await this.bindOnce(r,e?.silent===!0),this.effectivePort=r,this.port=r,this.startedAt=Date.now(),t>0&&!e?.silent&&process.stderr.write(`ws bridge bound to port ${r} (preferred ${this.preferredPort} was taken)
|
|
5
5
|
`),this.afterBind(),r}catch(o){if(o?.code!=="EADDRINUSE")throw o;e?.silent||process.stderr.write(`ws bridge port ${r} already in use, trying ${r+1}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-WWDJCKMI.js";import*as l from"fs";import*as i from"path";import{fileURLToPath as f}from"url";function g(){try{let s=f(import.meta.resolve("sootsim/package.json"));return i.join(i.dirname(s),"skills")}catch{let s=i.dirname(f(import.meta.url));return i.resolve(s,"../../skills")}}var m=g();function d(s){let n=s.match(/^---\n([\s\S]*?)\n---/);if(!n)return null;let e=n[1],o=e.match(/^name:\s*(.+)$/m),r=e.match(/^description:\s*(.+)$/m);return o?{name:o[1].trim(),description:r?.[1]?.trim()||""}:null}function p(){if(!l.existsSync(m))return[];let s=l.readdirSync(m).filter(e=>e.endsWith(".md")),n=[];for(let e of s){let o=l.readFileSync(i.join(m,e),"utf8"),r=d(o);r&&n.push({...r,filename:e})}return n}function u(s,n){let e=i.join(m,s.filename),o=i.join(n,s.filename);l.copyFileSync(e,o),console.log(` copied ${s.name} \u2192 ${o}`)}async function h(s){if(s.includes("--list")||s.includes("-l")||s.length===0){let t=p();if(t.length===0){console.log(" no skills found");return}console.log(`
|
|
3
3
|
available skills:
|
|
4
4
|
`);for(let c of t)console.log(` ${c.name}`),console.log(` ${c.description}
|
|
5
5
|
`);console.log(" usage: sootsim skills <target-dir> [skill-name...]"),console.log(" example: sootsim skills ./my-project"),console.log(` example: sootsim skills ./my-project debug perf
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-WWDJCKMI.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim test \u2014 run tests against sootsim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -26,6 +26,6 @@ examples:
|
|
|
26
26
|
notes:
|
|
27
27
|
playwright is best for smoke and package-local debugging
|
|
28
28
|
--detox is the preferred parity lane for behavior that should match real RN
|
|
29
|
-
`),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-
|
|
29
|
+
`),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-R4G5INNB.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-L7X5FGIN.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
|
|
30
30
|
results: ${a} passed, ${e} failed (${i.length} total)
|
|
31
31
|
`),process.exit(e>0?1:0)}export{v as runTest};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as a,d as b}from"./chunk-W3TYN64D.js";import"./chunk-AUR2LTNX.js";import"./chunk-UKYK63H6.js";import"./chunk-WVBPATRA.js";import"./chunk-C3QLIYCS.js";import"./chunk-W7CYWXRZ.js";import"./chunk-MZPAJ5PQ.js";import"./chunk-WRF43M33.js";import"./chunk-WWDJCKMI.js";export{a as resolveDefaultUploadOrigin,b as runUpload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
2
|
-
import{d as n}from"./chunk-
|
|
1
|
+
/*! sootsim v0.0.4 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as n}from"./chunk-UKYK63H6.js";import"./chunk-WWDJCKMI.js";async function s(){let o=await n();o?.token||(console.log(" not signed in"),process.exit(1));let e=o.user;console.log(` ${e?.email||e?.name||e?.id||"signed in"}`),console.log(` origin: ${o.origin}`),console.log(` updated: ${o.updatedAt}`)}export{s as runWhoami};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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/vite-base.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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.0.
|
|
1
|
+
/*! sootsim v0.0.4 | (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,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c}from"./chunk-NXWCDGWS.js";import"./chunk-EIZCWDRE.js";import"./chunk-CXTA5VGA.js";import"./chunk-K7LDP7JL.js";export{b as ensureDaemonRunning,a as ensureRuntimeInstalled,c as ensureSootsimReady};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as S,b as P,d as T,f as v}from"./chunk-XXUAOYYT.js";import{u as h,v as k}from"./chunk-CXTA5VGA.js";import{WebSocket as A}from"ws";function x(){let e=h();return e&&k(e)?e.bridgePort:7668}P();var p=class extends Error{lock;constructor(n,t){super(n),this.name="BridgeTabLockedError",this.lock=t}};function O(e){return e==="flag"?"via --tab":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no session pinned"}function F(e,n={}){let t=new Set,u=n.port??x(),c=n.commandTimeoutMs??15e3,a,g="none",b=new Set(n.stripBooleanFlags??[]),m=new Set(n.stripValueFlags??[]);for(let r=0;r<e.length;r++){let d=e[r];if(d==="--port"){t.add(r),r+1<e.length&&(t.add(r+1),u=Number(e[r+1])),r++;continue}if(d==="--timeout"){t.add(r),r+1<e.length&&(t.add(r+1),c=Number(e[r+1])),r++;continue}if(d==="--session"||d==="--id"||d==="--tab"){t.add(r),r+1<e.length&&(t.add(r+1),a=e[r+1],g="flag"),r++;continue}if(b.has(d)){t.add(r);continue}m.has(d)&&(t.add(r),r+1<e.length&&t.add(r+1),r++)}if(!a){let r=T();r&&(a=r,g="saved")}return{positional:e.filter((r,d)=>!t.has(d)),wsPort:u,browserId:a,browserIdSource:g,commandTimeoutMs:c}}function M(e,n={}){let t=1,u=n.commandTimeoutMs??15e3,c=new Map,a=new A(`ws://localhost:${e}`),g=n.browserId?{key:`browser:${n.browserId}`,source:"explicit-browser-id",stable:!0}:S(),b=new Promise((s,o)=>{a.on("open",()=>{try{a.send(JSON.stringify({type:"bridge:hello",id:0,cliSessionKey:g.key,cliSessionSource:g.source,cliLabel:n.cliLabel}))}catch{}s()}),a.on("error",i=>o(new Error(`could not connect to ws://localhost:${e}: ${i.message}`)))}),m=!1,r=!1;function d(s,o){if(r||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;r=!0;let i=o??"primary",l=O(n.browserIdSource);process.stderr.write(` \u2192 ${i} (${l})
|
|
3
|
-
`)}return a.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let i=c.get(o.id);i&&(c.delete(o.id),o.i>0&&!m&&(m=!0,process.stderr.write(`
|
|
4
|
-
\u26A0 ${o.i} other CLI client(s) are also connected to this tab
|
|
5
|
-
commands from multiple agents may interfere with each other.
|
|
6
|
-
use sootsim open --new to get a dedicated session.
|
|
7
|
-
|
|
8
|
-
`)),o.error?o.o?i.reject(new p(o.error,o.o)):i.reject(new Error(o.error)):i.resolve(o.result))}),a.on("close",(s,o)=>{let i=o?.toString()||"connection closed";for(let[l,w]of c)c.delete(l),w.reject(new Error(`session disconnected: ${i} (code ${s})`))}),{async send(s){let o=async i=>{await b;let l=t++;return new Promise((w,I)=>{let B=setTimeout(()=>{c.delete(l),I(new Error(`command timed out after ${Math.round(u/1e3)}s`))},u);c.set(l,{resolve:y=>{clearTimeout(B),w(y)},reject:y=>{clearTimeout(B),I(y)}});let f={...s,id:l};f.browserId===void 0&&i&&(f.browserId=i),d(s.type??"",f.browserId),a.send(JSON.stringify(f))})};try{return await o(n.browserId)}catch(i){let l=i instanceof Error?i.message:String(i);if(n.fallbackOnMissingBrowserId&&n.browserId&&s.browserId===void 0&&l===`no browser connected with id ${n.browserId}`)return v(),process.stderr.write(` \u26A0 saved session ${n.browserId} is gone \u2014 falling back to primary
|
|
9
|
-
pin a tab with: sootsim use <tab-id>
|
|
10
|
-
`),r=!1,o(void 0);throw i}},async listBrowsers(){let s=await this.send({type:"bridge:list-browsers"});return Array.isArray(s)?s:[]},async openUrl(s){return this.send({type:"bridge:open",url:s})},async focusBrowser(s){return this.send({type:"focus",browserId:s})},async closeBrowser(s){return this.send({type:"close",browserId:s})},async claim(s,o={}){return await this.send({type:"bridge:claim",browserId:s,force:o.force===!0})},close(){try{a.readyState===A.OPEN&&a.send(JSON.stringify({type:"bridge:bye",id:0}))}catch{}a.close()}}}function N(e){return M(e.wsPort,{commandTimeoutMs:e.commandTimeoutMs,browserId:e.browserId,fallbackOnMissingBrowserId:e.browserIdSource==="saved",browserIdSource:e.browserIdSource})}async function R(e){try{return await e.send({type:"evaluate",code:"document.hidden"})===!0?(process.stderr.write(`
|
|
11
|
-
\u26A0 target tab is hidden (document.hidden = true)
|
|
12
|
-
animations and rAF callbacks are throttled \u2014 coordinates may be wrong
|
|
13
|
-
and launch/transition animations will not complete.
|
|
14
|
-
bring the tab to the foreground or use: sootsim debug eval "window.focus()"
|
|
15
|
-
|
|
16
|
-
`),{hidden:!0,warned:!0}):{hidden:!1,warned:!1}}catch{return{hidden:!1,warned:!1}}}async function _(e,n,t={}){let u={type:"evaluate",code:n};return t.acquireLock&&(u.acquireLock=!0),e.send(u)}async function D(e,n,...t){return e.send({type:"call",path:n,args:t})}async function j(e,n,...t){return e.send({type:"call",path:n,args:t,acquireLock:!0})}export{x as a,p as b,F as c,M as d,N as e,R as f,_ as g,D as h,j as i};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{h as s,p as a}from"./chunk-CXTA5VGA.js";import{spawn as l}from"child_process";import{existsSync as f}from"fs";import{WebSocket as d}from"ws";async function w(){let e=a();if(e&&f(s(e)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:o}=await import("./runtime-JTLZYEXK.js");await o(["install"],{})}async function p(e=7668,o=5e3){if(await m(e,250))return;console.log(" starting sootsim bridge..."),l(process.execPath,[process.argv[1],"server","--quiet"],{detached:!0,stdio:"ignore"}).unref();let n=Date.now()+o;for(;Date.now()<n;){if(await m(e,200))return;await new Promise(t=>setTimeout(t,100))}throw new Error(`sootsim bridge failed to come up within ${o}ms \u2014 try \`sootsim server\` to debug`)}async function y(e=7668){await w(),await p(e)}function m(e,o){return new Promise(i=>{let n=new d(`ws://127.0.0.1:${e}`,{handshakeTimeout:o}),t=!1,r=u=>{if(!t){t=!0;try{n.close()}catch{}i(u)}};n.once("open",()=>r(!0)),n.once("error",()=>r(!1)),setTimeout(()=>r(!1),o)})}export{w as a,p as b,y as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m}from"./chunk-6IPY24VM.js";import"./chunk-AS4V7TZU.js";import"./chunk-TGDP3D3V.js";import"./chunk-LXCFGKL2.js";import"./chunk-3HBBSRLE.js";import"./chunk-FUQ4XA6I.js";import"./chunk-XXUAOYYT.js";import"./chunk-EIZCWDRE.js";import"./chunk-CXTA5VGA.js";import"./chunk-YVSZHVLU.js";import"./chunk-B5R4K2DG.js";import"./chunk-K7LDP7JL.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedBrowsers,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 summarizeBrowserUrl,g as waitForBrowserMatch};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import"./chunk-XKDQEYTE.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-YVSZHVLU.js";import"./chunk-B5R4K2DG.js";import"./chunk-K7LDP7JL.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,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d}from"./chunk-4372UQHZ.js";import"./chunk-EWEKADK4.js";import"./chunk-GQUOQNTP.js";import"./chunk-5C5I5OFM.js";import"./chunk-4GWEO5CL.js";import"./chunk-NHA3G6A3.js";import"./chunk-TSZBQS6W.js";import"./chunk-CZZB4DWG.js";import"./chunk-NE62JSI6.js";import"./chunk-ET3NNZAR.js";import"./chunk-HBNVKYSC.js";import"./chunk-ISAMAM3I.js";import"./chunk-EWMYTXM2.js";import"./chunk-6IPY24VM.js";import"./chunk-AS4V7TZU.js";import"./chunk-TGDP3D3V.js";import"./chunk-LXCFGKL2.js";import"./chunk-3HBBSRLE.js";import"./chunk-FUQ4XA6I.js";import"./chunk-XXUAOYYT.js";import"./chunk-EIZCWDRE.js";import"./chunk-CXTA5VGA.js";import"./chunk-YVSZHVLU.js";import"./chunk-B5R4K2DG.js";import"./chunk-K7LDP7JL.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.0.2 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{c as a,d as b}from"./chunk-TSZBQS6W.js";import"./chunk-CZZB4DWG.js";import"./chunk-NE62JSI6.js";import"./chunk-LXCFGKL2.js";import"./chunk-FUQ4XA6I.js";import"./chunk-XXUAOYYT.js";import"./chunk-EIZCWDRE.js";import"./chunk-CXTA5VGA.js";import"./chunk-K7LDP7JL.js";export{a as resolveDefaultUploadOrigin,b as runUpload};
|