sootsim 0.1.293 → 0.1.294
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/detox/expectations.ts +4 -3
- package/detox/index.ts +2 -4
- package/dist-cli/bin.js +7 -5
- package/dist-cli/chunks/{agent-YWI2NWL7.js → agent-GDFF6G7N.js} +4 -2
- package/dist-cli/chunks/{agent-wrapper-IYJ7UZOA.js → agent-wrapper-ZUKQUOD2.js} +4 -2
- package/dist-cli/chunks/{app-fonts-FQFUC4LR.js → app-fonts-IMYBO6AQ.js} +4 -2
- package/dist-cli/chunks/{assert-XUCELWAC.js → assert-GXOGZUKO.js} +4 -2
- package/dist-cli/chunks/{auth-4DQTV3OW.js → auth-P7FAKLHQ.js} +4 -2
- package/dist-cli/chunks/beta-RXT5RU3A.js +4 -0
- package/dist-cli/chunks/{camera-RYOHBVZA.js → camera-RNVAC4IO.js} +4 -2
- package/dist-cli/chunks/{chunk-2XYCSFGN.js → chunk-24BJFJFB.js} +26 -24
- package/dist-cli/chunks/{chunk-WVMYRKSS.js → chunk-2M7OZ6Y4.js} +4 -2
- package/dist-cli/chunks/chunk-37ZXWXM3.js +4 -0
- package/dist-cli/chunks/{chunk-UOHGYYSO.js → chunk-3F2GAJ4Z.js} +3 -1
- package/dist-cli/chunks/{chunk-KC5SCOGS.js → chunk-4Z4URZOG.js} +4 -2
- package/dist-cli/chunks/{chunk-LOQLZFRK.js → chunk-5S3GPTX7.js} +4 -2
- package/dist-cli/chunks/chunk-6YN3IAWJ.js +4 -0
- package/dist-cli/chunks/{chunk-YRFWATLA.js → chunk-7HVMAGDK.js} +4 -2
- package/dist-cli/chunks/{chunk-4B4VFT73.js → chunk-7Q77LTPT.js} +7 -5
- package/dist-cli/chunks/{chunk-RKXHQ2Q3.js → chunk-AFLGWOX3.js} +18 -16
- package/dist-cli/chunks/{chunk-LA5DIO33.js → chunk-AMKQUZA2.js} +3 -1
- package/dist-cli/chunks/{chunk-TJS5IMOH.js → chunk-AO65WEF7.js} +3 -1
- package/dist-cli/chunks/{chunk-BQT5YDTV.js → chunk-BBVBMGTT.js} +5 -3
- package/dist-cli/chunks/{chunk-WPPMUUML.js → chunk-BXO2PTNM.js} +4 -2
- package/dist-cli/chunks/{chunk-2VKTOZQ5.js → chunk-CTMPC5DN.js} +4 -2
- package/dist-cli/chunks/{chunk-RV67J726.js → chunk-D2R7PDN5.js} +3 -1
- package/dist-cli/chunks/{chunk-RMLJXP7T.js → chunk-DI55E6CS.js} +4 -2
- package/dist-cli/chunks/chunk-DUHBRW7J.js +4 -0
- package/dist-cli/chunks/chunk-EXTV6NWM.js +74 -0
- package/dist-cli/chunks/{chunk-6IFJLHDA.js → chunk-FNCSUHUR.js} +3 -1
- package/dist-cli/chunks/{chunk-DE4ZA3NL.js → chunk-FSRRJGYC.js} +4 -2
- package/dist-cli/chunks/{chunk-UPKYK52K.js → chunk-I233T2T4.js} +4 -2
- package/dist-cli/chunks/{chunk-E5WYXRGV.js → chunk-ISJ4ACWL.js} +28 -26
- package/dist-cli/chunks/{chunk-AFRXWKTA.js → chunk-JFWEDISV.js} +3 -1
- package/dist-cli/chunks/chunk-JGGXQHXH.js +10 -0
- package/dist-cli/chunks/chunk-JUOQ4ZPA.js +7 -0
- package/dist-cli/chunks/{chunk-2M57EAWS.js → chunk-K53YCAQM.js} +3 -1
- package/dist-cli/chunks/{chunk-7B6RGFTM.js → chunk-KWIURH7N.js} +4 -2
- package/dist-cli/chunks/{chunk-VO74GDXL.js → chunk-N4MT5KEB.js} +5 -3
- package/dist-cli/chunks/{chunk-VZ44FQDG.js → chunk-O6I5ZGMY.js} +3 -1
- package/dist-cli/chunks/chunk-OKSGM6IG.js +4 -0
- package/dist-cli/chunks/chunk-OYYQQBKP.js +3 -0
- package/dist-cli/chunks/{chunk-NCCMRFXU.js → chunk-PSOUSJSZ.js} +3 -1
- package/dist-cli/chunks/{chunk-J6P2UPXH.js → chunk-PZTKQG6H.js} +4 -2
- package/dist-cli/chunks/{chunk-B7TX4WFB.js → chunk-RWUNC66S.js} +4 -2
- package/dist-cli/chunks/{chunk-547W23BB.js → chunk-SLMUW2WU.js} +4 -2
- package/dist-cli/chunks/{chunk-WI36YJ23.js → chunk-SPQKJDIK.js} +3 -1
- package/dist-cli/chunks/{chunk-PCAPHXN3.js → chunk-V2MYTL4C.js} +4 -2
- package/dist-cli/chunks/{chunk-JOPKZVOW.js → chunk-VVVORIQI.js} +3 -1
- package/dist-cli/chunks/chunk-VXGCZUX4.js +5 -0
- package/dist-cli/chunks/chunk-W44PDEQH.js +4 -0
- package/dist-cli/chunks/{chunk-WOWLO4LL.js → chunk-WQL3BLFD.js} +3 -1
- package/dist-cli/chunks/{chunk-U3564F2Y.js → chunk-WYRLRNIP.js} +4 -2
- package/dist-cli/chunks/{chunk-WP3TFHFL.js → chunk-XYFP466E.js} +4 -2
- package/dist-cli/chunks/chunk-ZFMJFX27.js +4 -0
- package/dist-cli/chunks/{chunk-67CIS55C.js → chunk-ZUX5PIGI.js} +3 -1
- package/dist-cli/chunks/{cleanup-BLFDJSFS.js → cleanup-74SKOD2P.js} +4 -2
- package/dist-cli/chunks/cli-version-2JGMYL4O.js +4 -0
- package/dist-cli/chunks/{compat-Q3WCSTB7.js → compat-ME6HXEEU.js} +5 -3
- package/dist-cli/chunks/{config-NHNMRRNB.js → config-PM67EWT3.js} +4 -2
- package/dist-cli/chunks/control-HV7GZXAH.js +4 -0
- package/dist-cli/chunks/daemon-LKRHF5OK.js +4 -0
- package/dist-cli/chunks/{debug-PGRMZFXA.js → debug-XUGWZLIW.js} +5 -3
- package/dist-cli/chunks/{desktop-NVTQ37LH.js → desktop-IO5HPX5Z.js} +5 -3
- package/dist-cli/chunks/{detox-W3JDXS76.js → detox-E42OEJJZ.js} +4 -2
- package/dist-cli/chunks/{device-KQYN3EVK.js → device-XA67L2EB.js} +4 -2
- package/dist-cli/chunks/{diagnose-CPUKSGNO.js → diagnose-36FD6ECF.js} +4 -2
- package/dist-cli/chunks/disk-cleanup-DDCFGFWK.js +4 -0
- package/dist-cli/chunks/drivers-C2SH3DWS.js +4 -0
- package/dist-cli/chunks/{film-VZGAZ2YY.js → film-XARTGFIZ.js} +11 -24
- package/dist-cli/chunks/flow-E64G5LF3.js +4 -0
- package/dist-cli/chunks/help-4ZSRG4F4.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-KWHABCNZ.js → hidden-runtime-alias-T4ZALBE2.js} +4 -2
- package/dist-cli/chunks/{home-paths-O4CGYVHF.js → home-paths-5L7N2FLS.js} +4 -2
- package/dist-cli/chunks/inspect-U2SV25ER.js +4 -0
- package/dist-cli/chunks/install-desktop-LTGVT7ID.js +4 -0
- package/dist-cli/chunks/{login-KPN4Z26Q.js → login-GF6WVVER.js} +6 -4
- package/dist-cli/chunks/logout-6F6UKUNI.js +4 -0
- package/dist-cli/chunks/{maestro-PYA4AHTS.js → maestro-FMPKHEMX.js} +13 -11
- package/dist-cli/chunks/{maestro-generate-KCMYWPWL.js → maestro-generate-QGPGNXI6.js} +5 -3
- package/dist-cli/chunks/{mode-AEB7G2SJ.js → mode-JSNMAHDZ.js} +4 -2
- package/dist-cli/chunks/optional-demo-registry-K4VERLJV.js +4 -0
- package/dist-cli/chunks/{perf-YLXGZI3E.js → perf-PO7ARUTG.js} +4 -2
- package/dist-cli/chunks/{permissions-7VMVZOUV.js → permissions-XI2QUAEZ.js} +4 -2
- package/dist-cli/chunks/{record-AVQO45PE.js → record-4CJCJAFD.js} +5 -3
- package/dist-cli/chunks/runtime-SN2RWDES.js +4 -0
- package/dist-cli/chunks/{screenshot-command-LACQLA4N.js → screenshot-command-NDVULWMZ.js} +5 -3
- package/dist-cli/chunks/{screenshots-capture-PROOBSGB.js → screenshots-capture-Q7UTXF3V.js} +4 -2
- package/dist-cli/chunks/{serve-FJN2FRGW.js → serve-UEUIBHCK.js} +4 -2
- package/dist-cli/chunks/{setup-IVV4NRYQ.js → setup-ZEEWYK4B.js} +5 -3
- package/dist-cli/chunks/{skills-WYR3PJOH.js → skills-NFG6VAO5.js} +4 -2
- package/dist-cli/chunks/{storage-GM7K4MGM.js → storage-POWCOUCQ.js} +4 -2
- package/dist-cli/chunks/store-BJK7V7FL.js +4 -0
- package/dist-cli/chunks/telemetry-EJP5EW7K.js +4 -0
- package/dist-cli/chunks/{timeline-R5UL3N4T.js → timeline-MNHZCVAL.js} +4 -2
- package/dist-cli/chunks/{upgrade-RWHSFZRX.js → upgrade-X57SIG7L.js} +4 -2
- package/dist-cli/chunks/upload-JABM3ITZ.js +4 -0
- package/dist-cli/chunks/{version-7K6TVQOW.js → version-V4IKIDX7.js} +4 -2
- package/dist-cli/chunks/web-F5CLF34I.js +4 -0
- package/dist-cli/chunks/{what-happened-K24TSJZX.js → what-happened-H74HHGRK.js} +4 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +3 -3
- 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/beta.cjs +1 -1
- package/dist-lib/beta.mjs +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/detox/index.cjs +5 -4
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +3 -3
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +45 -4
- package/dist-lib/menu.mjs +42 -4
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +5 -2
- package/dist-lib/sdk.mjs +4 -2
- package/dist-lib/skills.cjs +325 -182
- package/dist-lib/vite.cjs +1 -1
- package/package.json +6 -1
- package/scripts/postinstall.cjs +11 -2
- package/src/agent-identity.ts +2 -2
- package/src/menu.ts +53 -4
- package/src/vite-plugin.ts +102 -2
- package/dist-cli/chunks/beta-CFDAW6UN.js +0 -2
- package/dist-cli/chunks/chunk-3UX6AY2B.js +0 -2
- package/dist-cli/chunks/chunk-6VVLDYPV.js +0 -8
- package/dist-cli/chunks/chunk-7H34H74K.js +0 -72
- package/dist-cli/chunks/chunk-7H5G4HUK.js +0 -2
- package/dist-cli/chunks/chunk-ACSTEPSD.js +0 -2
- package/dist-cli/chunks/chunk-HKMWUN7F.js +0 -2
- package/dist-cli/chunks/chunk-K5JEUI5G.js +0 -5
- package/dist-cli/chunks/chunk-MOU2WLO4.js +0 -2
- package/dist-cli/chunks/chunk-QXDXUDJD.js +0 -1
- package/dist-cli/chunks/chunk-USJTVC7T.js +0 -2
- package/dist-cli/chunks/chunk-YNG4C3ZS.js +0 -2
- package/dist-cli/chunks/cli-version-TQHZOK4L.js +0 -2
- package/dist-cli/chunks/control-I7YBDRJT.js +0 -2
- package/dist-cli/chunks/daemon-4R3SZLZY.js +0 -2
- package/dist-cli/chunks/disk-cleanup-2COWZWBC.js +0 -2
- package/dist-cli/chunks/drivers-RRZM6E72.js +0 -2
- package/dist-cli/chunks/flow-VH6DFDQ4.js +0 -2
- package/dist-cli/chunks/help-3HQ2RINO.js +0 -2
- package/dist-cli/chunks/inspect-PKMJGXDH.js +0 -2
- package/dist-cli/chunks/install-desktop-K5TP3ZHJ.js +0 -2
- package/dist-cli/chunks/logout-E3UCJAMC.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-AIWOBAAA.js +0 -2
- package/dist-cli/chunks/runtime-HOGETVVD.js +0 -2
- package/dist-cli/chunks/store-YLVHPKG7.js +0 -2
- package/dist-cli/chunks/telemetry-MQKB6PFX.js +0 -2
- package/dist-cli/chunks/upload-RBH4XGJ2.js +0 -2
- package/dist-cli/chunks/web-46ZPQCAL.js +0 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a as re,b as ne,f as se}from"./chunk-ISJ4ACWL.js";import"./chunk-7HVMAGDK.js";import{a as k}from"./chunk-K53YCAQM.js";import{b as Q}from"./chunk-24BJFJFB.js";import{a as ee}from"./chunk-WYRLRNIP.js";import"./chunk-BXO2PTNM.js";import{a as te,b as oe}from"./chunk-FSRRJGYC.js";import"./chunk-7Q77LTPT.js";import"./chunk-XYFP466E.js";import"./chunk-ZUX5PIGI.js";import"./chunk-RWUNC66S.js";import"./chunk-KWIURH7N.js";import"./chunk-AMKQUZA2.js";import{s as K}from"./chunk-AFLGWOX3.js";import"./chunk-6YN3IAWJ.js";import"./chunk-37ZXWXM3.js";import"./chunk-VVVORIQI.js";import"./chunk-W44PDEQH.js";import"./chunk-FNCSUHUR.js";import{g as A,h as X,i as R,j as J,k as Z,l as M,m as P}from"./chunk-PZTKQG6H.js";import"./chunk-SPQKJDIK.js";import"./chunk-ZFMJFX27.js";import"./chunk-SLMUW2WU.js";import"./chunk-AO65WEF7.js";import"./chunk-4Z4URZOG.js";import"./chunk-DI55E6CS.js";import{b as F,e as x,f as j,g as I,h as L,i as U,j as E}from"./chunk-VXGCZUX4.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import"./chunk-JFWEDISV.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";import{mkdirSync as le,writeFileSync as ie}from"fs";import{dirname as ce,resolve as ue}from"path";async function de(e,t){let o=Ie(e);(o.includes("--help")||o.includes("-h"))&&(console.log(`
|
|
3
5
|
sootsim screenshot \u2014 capture the canvas as a PNG
|
|
4
6
|
|
|
5
7
|
usage:
|
|
@@ -151,4 +153,4 @@ examples:
|
|
|
151
153
|
await new Promise((r) => setTimeout(r, 40))
|
|
152
154
|
}
|
|
153
155
|
return false
|
|
154
|
-
})()`,{acquireLock:!0}))throw new Error("could not enable screenshot mode \u2014 is this a browser sim with the screenshot plugin? (electron has no screenshot mode)")}function wt(e){console.log(` ${e.projectName} \u2014 canvas ${e.canvas} (${e.exportSize.width}\xD7${e.exportSize.height}), device ${e.deviceModel}`);for(let t of e.slides){let o=[t.focused?"focused":t.active?"active":null,t.captured?`captured${t.captureMode==="3d"?" 3d":""}`:"no capture"].filter(Boolean).join(", "),i=t.title?`"${t.title}"`:"(no title)",r=[`bg ${t.bgTop}\u2192${t.bgBottom}`,t.titleColor?`color ${t.titleColor}`:null,t.titleSize?`size ${t.titleSize}`:null,t.titleUnderlay?`underlay ${t.titleUnderlay}`:null,t.titleShadow?`shadow ${t.titleShadow}`:null].filter(Boolean).join(", ");console.log(` ${t.index}. ${i} \u2014 ${r} [${o}]`),t.subtitle&&console.log(` ${t.subtitle}`)}}function yt(e){let t=e.match(/^data:[^;]+;base64,(.+)$/);if(!t)throw new Error("export returned an unexpected payload");return Buffer.from(t[1],"base64")}async function Fe(e,t){if(e.includes("--help")||e.includes("-h")){console.log(pt);return}let{rest:o,values:i,json:r}=ht(e),s=A(o,{port:t.port,commandTimeoutMs:45e3}),n=s.positional[0]??"list",a=ft(s.positional[1]),l=Number(s.positional[2]),c=R(s),u=d=>{r?console.log(JSON.stringify(d,null,2)):wt(d)};try{switch(await gt(c),n){case"list":{u(await M(c,"SootSim.bridges.screenshotControl.getState"));break}case"set":{if(a==null)throw new Error("usage: sootsim screenshot slides set <n> --title \u2026 (see --help)");let d={};for(let m of["title","subtitle","bgTop","bgBottom","titleColor","titleSize","titleUnderlay","titleShadow"])i[m]!=null&&(d[m]=i[m]);if(Object.keys(d).length===0)throw new Error("nothing to set \u2014 pass at least one field (see --help)");u(await P(c,"SootSim.bridges.screenshotControl.setSlide",a,d));break}case"add":{u(await P(c,"SootSim.bridges.screenshotControl.addSlide"));break}case"remove":{if(a==null)throw new Error("usage: sootsim screenshot slides remove <n>");u(await P(c,"SootSim.bridges.screenshotControl.removeSlide",a));break}case"move":{if(a==null||!Number.isInteger(l)||l<1)throw new Error("usage: sootsim screenshot slides move <n> <position>");u(await P(c,"SootSim.bridges.screenshotControl.moveSlide",a,l));break}case"focus":{if(a==null)throw new Error("usage: sootsim screenshot slides focus <n>");u(await P(c,"SootSim.bridges.screenshotControl.focusSlide",a));break}case"overview":{u(await P(c,"SootSim.bridges.screenshotControl.overview"));break}case"capture":{let d=await P(c,"SootSim.bridges.screenshotControl.capture",...a!=null?[a]:[]);u(d);break}case"export":{let d=i.out?ut(i.out)?i.out:dt(process.cwd(),i.out):Ne(process.cwd(),"screenshots"),m=await M(c,"SootSim.bridges.screenshotControl.getState"),h=a!=null?m.slides.filter(p=>p.index===a||p.id===a):m.slides.filter(p=>p.captured);if(h.length===0)throw new Error(a!=null?`no slide ${a}`:"no captured slides to export \u2014 capture first");let w=[];for(let p of h){let y=await M(c,"SootSim.bridges.screenshotControl.exportSlide",p.index),f=Ne(d,y.name);at(ct(f),{recursive:!0}),lt(f,yt(y.dataUrl)),w.push(f),console.log(` saved: ${f} (${y.width}\xD7${y.height})`)}r&&console.log(JSON.stringify({written:w},null,2));break}default:throw new Error(`unknown subcommand "${n}" \u2014 see sootsim screenshot slides --help`)}}finally{c.close()}}var bt=new Set(["--sim","--port","-p","--output","-o","--out","--plan","--app","--device","--org","--repo","--api-origin","--branch","--platform","--slides","--shell-origin","--timeout"]),St=new Set(["capture","slides","appstore"]);function Ee(e){for(let t=0;t<e.length;t++){let o=e[t];if(o.startsWith("-")){bt.has(o)&&t++;continue}return St.has(o)?{name:o,index:t}:null}return null}function _(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function xt(e){let t=[];for(let o=0;o<e.length;o++){if(e[o]==="--sim"){o++;continue}t.push(e[o])}return t}async function xo(e,t){let o=Ee(e);if(!o||o.name==="capture"){await de(o?_(e,o.index):e,t);return}if(o.name==="slides"){await Fe(_(e,o.index),t);return}let i=_(e,o.index),r=Ee(i);if(r?.name==="capture")try{let{runScreenshotsCapture:s}=await import("./screenshots-capture-
|
|
156
|
+
})()`,{acquireLock:!0}))throw new Error("could not enable screenshot mode \u2014 is this a browser sim with the screenshot plugin? (electron has no screenshot mode)")}function wt(e){console.log(` ${e.projectName} \u2014 canvas ${e.canvas} (${e.exportSize.width}\xD7${e.exportSize.height}), device ${e.deviceModel}`);for(let t of e.slides){let o=[t.focused?"focused":t.active?"active":null,t.captured?`captured${t.captureMode==="3d"?" 3d":""}`:"no capture"].filter(Boolean).join(", "),i=t.title?`"${t.title}"`:"(no title)",r=[`bg ${t.bgTop}\u2192${t.bgBottom}`,t.titleColor?`color ${t.titleColor}`:null,t.titleSize?`size ${t.titleSize}`:null,t.titleUnderlay?`underlay ${t.titleUnderlay}`:null,t.titleShadow?`shadow ${t.titleShadow}`:null].filter(Boolean).join(", ");console.log(` ${t.index}. ${i} \u2014 ${r} [${o}]`),t.subtitle&&console.log(` ${t.subtitle}`)}}function yt(e){let t=e.match(/^data:[^;]+;base64,(.+)$/);if(!t)throw new Error("export returned an unexpected payload");return Buffer.from(t[1],"base64")}async function Fe(e,t){if(e.includes("--help")||e.includes("-h")){console.log(pt);return}let{rest:o,values:i,json:r}=ht(e),s=A(o,{port:t.port,commandTimeoutMs:45e3}),n=s.positional[0]??"list",a=ft(s.positional[1]),l=Number(s.positional[2]),c=R(s),u=d=>{r?console.log(JSON.stringify(d,null,2)):wt(d)};try{switch(await gt(c),n){case"list":{u(await M(c,"SootSim.bridges.screenshotControl.getState"));break}case"set":{if(a==null)throw new Error("usage: sootsim screenshot slides set <n> --title \u2026 (see --help)");let d={};for(let m of["title","subtitle","bgTop","bgBottom","titleColor","titleSize","titleUnderlay","titleShadow"])i[m]!=null&&(d[m]=i[m]);if(Object.keys(d).length===0)throw new Error("nothing to set \u2014 pass at least one field (see --help)");u(await P(c,"SootSim.bridges.screenshotControl.setSlide",a,d));break}case"add":{u(await P(c,"SootSim.bridges.screenshotControl.addSlide"));break}case"remove":{if(a==null)throw new Error("usage: sootsim screenshot slides remove <n>");u(await P(c,"SootSim.bridges.screenshotControl.removeSlide",a));break}case"move":{if(a==null||!Number.isInteger(l)||l<1)throw new Error("usage: sootsim screenshot slides move <n> <position>");u(await P(c,"SootSim.bridges.screenshotControl.moveSlide",a,l));break}case"focus":{if(a==null)throw new Error("usage: sootsim screenshot slides focus <n>");u(await P(c,"SootSim.bridges.screenshotControl.focusSlide",a));break}case"overview":{u(await P(c,"SootSim.bridges.screenshotControl.overview"));break}case"capture":{let d=await P(c,"SootSim.bridges.screenshotControl.capture",...a!=null?[a]:[]);u(d);break}case"export":{let d=i.out?ut(i.out)?i.out:dt(process.cwd(),i.out):Ne(process.cwd(),"screenshots"),m=await M(c,"SootSim.bridges.screenshotControl.getState"),h=a!=null?m.slides.filter(p=>p.index===a||p.id===a):m.slides.filter(p=>p.captured);if(h.length===0)throw new Error(a!=null?`no slide ${a}`:"no captured slides to export \u2014 capture first");let w=[];for(let p of h){let y=await M(c,"SootSim.bridges.screenshotControl.exportSlide",p.index),f=Ne(d,y.name);at(ct(f),{recursive:!0}),lt(f,yt(y.dataUrl)),w.push(f),console.log(` saved: ${f} (${y.width}\xD7${y.height})`)}r&&console.log(JSON.stringify({written:w},null,2));break}default:throw new Error(`unknown subcommand "${n}" \u2014 see sootsim screenshot slides --help`)}}finally{c.close()}}var bt=new Set(["--sim","--port","-p","--output","-o","--out","--plan","--app","--device","--org","--repo","--api-origin","--branch","--platform","--slides","--shell-origin","--timeout"]),St=new Set(["capture","slides","appstore"]);function Ee(e){for(let t=0;t<e.length;t++){let o=e[t];if(o.startsWith("-")){bt.has(o)&&t++;continue}return St.has(o)?{name:o,index:t}:null}return null}function _(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function xt(e){let t=[];for(let o=0;o<e.length;o++){if(e[o]==="--sim"){o++;continue}t.push(e[o])}return t}async function xo(e,t){let o=Ee(e);if(!o||o.name==="capture"){await de(o?_(e,o.index):e,t);return}if(o.name==="slides"){await Fe(_(e,o.index),t);return}let i=_(e,o.index),r=Ee(i);if(r?.name==="capture")try{let{runScreenshotsCapture:s}=await import("./screenshots-capture-Q7UTXF3V.js");return await s(xt(_(i,r.index)))}catch(s){if(s instanceof Error&&"code"in s&&s.code==="ERR_MODULE_NOT_FOUND")return console.error("screenshot appstore capture is repo-only tooling \u2014 it needs the sootsim workspace (playwright is not shipped with the published CLI)."),1;throw s}return De(i,t)}export{xo as runScreenshotCommand};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{b as M}from"./chunk-K53YCAQM.js";import{a as x}from"./chunk-FSRRJGYC.js";import"./chunk-SLMUW2WU.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";import{execSync as T}from"node:child_process";import{mkdirSync as D,mkdtempSync as O,rmSync as E,writeFileSync as j}from"node:fs";import{tmpdir as G}from"node:os";import{dirname as q,isAbsolute as B,join as U,resolve as L}from"node:path";import{chromium as W}from"playwright-core";var z=`
|
|
3
5
|
sootsim screenshot appstore capture \u2014 headlessly capture + upload App Store slides
|
|
4
6
|
|
|
5
7
|
usage:
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{b as me,c as j,d as he,e as J,f as fe,h as ge,i as E,j as Se,k as ye,l as ve,m as be,q as we,t as k,u as Ae,v as ke,w as Te,x as Ce}from"./chunk-2M7OZ6Y4.js";import"./chunk-O6I5ZGMY.js";import{e as pe}from"./chunk-BXO2PTNM.js";import"./chunk-FSRRJGYC.js";import{f as x,g as de,h as le}from"./chunk-XYFP466E.js";import"./chunk-6YN3IAWJ.js";import"./chunk-37ZXWXM3.js";import{d as ue}from"./chunk-VVVORIQI.js";import"./chunk-FNCSUHUR.js";import"./chunk-PZTKQG6H.js";import{a as U,b as V,c as ne,d as se}from"./chunk-ZFMJFX27.js";import"./chunk-SLMUW2WU.js";import{d as O}from"./chunk-CTMPC5DN.js";import{a as ae,b as ce}from"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import{E as z,G as _,H as W,I as X,J as Y,K as Z,M as Q,O as ee,P as te,Q as ie,R as $,S as re,h as G,y as F,z as q}from"./chunk-WQL3BLFD.js";import{a as oe}from"./chunk-PSOUSJSZ.js";import"./chunk-D2R7PDN5.js";import{spawn as pt}from"child_process";import I from"fs";import{createServer as mt}from"http";import w from"path";import{WebSocket as f,WebSocketServer as ht}from"ws";import Ee from"node:fs";import L from"node:path";import{spawn as Fe}from"node:child_process";function We(o){return typeof o.text=="string"?o.text.trim():""}function $e(o){let e=o?.trim();return e||"tm"}async function Ie(o){let e=o.sessionId.trim();if(!V(e))throw new Error(`invalid Team Machine session id: ${e||"<empty>"}`);let t=We(o.prompt);if(!t)throw new Error("prompt text is empty");let i=$e(o.command),s=o.timeoutMs??15e3;await new Promise((n,a)=>{let r=Fe(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),c="",d=setTimeout(()=>{try{r.kill("SIGTERM")}catch{}a(new Error(`tm send timed out after ${Math.round(s/1e3)}s`))},s);r.stderr?.setEncoding("utf8"),r.stderr?.on("data",l=>{c.length<4e3&&(c+=String(l))}),r.on("error",l=>{clearTimeout(d),a(l)}),r.on("exit",(l,u)=>{if(clearTimeout(d),l===0){n();return}let m=c.trim();a(new Error(m||`tm send exited with ${u?`signal ${u}`:`code ${l??"unknown"}`}`))})})}var M=1,je=25;function Je(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var B=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;pendingSessionStates=new Map;pendingSessionPatches=new Map;sessionStatusPersistTimer=null;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let s=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,s,n)}catch(n){n instanceof k?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await be()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
|
|
3
5
|
`)}}close(){this.sessionStatusPersistTimer&&(clearTimeout(this.sessionStatusPersistTimer),this.sessionStatusPersistTimer=null),this.flushSessionStatuses();for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return J();case"agent:upsert-project":return j(i.input??{});case"agent:delete-project":return ge(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return Se(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-claimed-prompt":return this.sendClaimedPrompt(i);case"agent:send-prompt":{let n=String(i.sessionId),a=E(n);if(!a)throw new k("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await ke(n,r),this.notePromptAccepted(n,r,a.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await Te(String(i.sessionId));let s=E(String(i.sessionId));return s&&this.broadcastSessionStatus(s),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new k("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async sendClaimedPrompt(e){let t=typeof e.simId=="string"?e.simId.trim():"";if(!t)throw new k("NO_SIM","agent:send-claimed-prompt requires simId");let i=this.opts.resolveCliLease?.(t)??null;if(!i||i.kind!=="cli"||i.expiresAt<=Date.now())throw new k("NO_CLAIM",`sim ${t} has no active CLI claim`);let s=U(i.cliIdentityKey);if(!s)throw new k("UNSUPPORTED_CLAIM",`sim ${t} is claimed by a CLI identity that is not promptable`);return await Ie({sessionId:s,prompt:this.normalizePromptEnvelope(e)}),{ok:!0,routed:"team-machine",sessionId:s}}async doStartSession(e){if(!he(e.projectId))throw new k("NO_PROJECT",`no project: ${e.projectId}`);let i=await Ae(e);return this.broadcastSessionStatus(i.session),i}async autoAttachForUrl(e){let t=e.bundleUrl??"",i=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!i)return{project:null};let s=this.opts.getExcludePorts?.()??Je(),a=(await x({excludePorts:s})).find(l=>String(l.port)===i);if(!a||!a.cwd)return{project:null};let r=J().find(l=>l.cwd===a.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],a.bundleUrl,t]));return{project:j({cwd:a.cwd,name:a.projectName??L.basename(a.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[a.cwd],knownBundleUrls:c,framework:r?.framework??Ke(a.framework),bundleId:a.bundleId??r?.bundleId})}}getTranscript(e){let t=we(e);return Ee.existsSync(t)?Ee.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=me();return{userDataDir:e,storeFile:L.join(e,"attached-projects.json"),sessionsDir:L.join(e,"sessions"),transcriptsDir:L.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let s=this.subscriptions.get(t);if(s)return s.refCount++,{ok:!0,refCount:s.refCount};let n=Ce(t,a=>{let r=this.coalescePromptEcho(t,a);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),a.type==="turn-completed"){let c=E(t);if(c)try{fe(c.projectId,{usd:a.costUsd,ts:a.ts})}catch(d){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${d instanceof Error?d.message:String(d)}
|
|
4
6
|
`)}}});return this.subscriptions.set(t,{unsubscribe:n,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let i=this.sessionsBySocket.get(e);return!i||!i.has(t)?{ok:!0,refCount:0}:(i.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 i of this.sessionsBySocket.values())i.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,i){let s=Date.now(),n=this.pendingPromptEchoes.get(e)??[];n.push({sentAt:s}),this.pendingPromptEchoes.set(e,n);let a=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,a);let r=t.displayText??t.text;return this.patchSession(e,{lastPrompt:r,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:r,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:s}),{ok:!0,queued:a>1,pendingTurns:a,queueDepth:Math.max(0,a-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 i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>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 i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=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){let i=this.pendingSessionStates.get(e)??E(e);if(!i)return;let s=ye(i,t);this.pendingSessionStates.set(e,s),this.pendingSessionPatches.set(e,{...this.pendingSessionPatches.get(e),...t}),this.broadcastSessionStatus(s),!this.sessionStatusPersistTimer&&(this.sessionStatusPersistTimer=setTimeout(()=>{this.sessionStatusPersistTimer=null,this.flushSessionStatuses()},je))}flushSessionStatuses(){if(this.pendingSessionPatches.size===0)return;let e=this.pendingSessionStates,t=this.pendingSessionPatches;this.pendingSessionStates=new Map,this.pendingSessionPatches=new Map;try{ve([...t].map(([i,s])=>({id:i,patch:s})))}catch(i){for(let[s,n]of e)this.pendingSessionStates.has(s)||this.pendingSessionStates.set(s,n);for(let[s,n]of t)this.pendingSessionPatches.set(s,{...n,...this.pendingSessionPatches.get(s)});process.stderr.write(`[sootsim-agent] session status persistence failed: ${i instanceof Error?i.message:String(i)}
|
|
5
7
|
`)}}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),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 i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[s,n]of this.sessionsBySocket)if(n.has(e)&&s.readyState===M)try{s.send(i)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let i of this.allSockets)if(i.readyState===M)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===M)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===M)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function Ke(o){return o==="expo"?"expo":o==="one"||o==="vxrn"?"one":"unknown"}import Re from"http";import _e from"https";import{finished as qe,pipeline as ze}from"stream/promises";var K="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",Ve=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"},suppressBrowserUserAgent:!0}];function Ge(o){let e=o.toLowerCase();for(let t of Ve)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t}function Pe(o){let e=Ge(o.hostname);return{"accept-encoding":"identity",...e?.suppressBrowserUserAgent?{}:{"user-agent":K},...e?.headers}}var Xe=new Set(["host","origin","referer","user-agent","accept-encoding","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),Ye={"access-control-allow-origin":"*","access-control-allow-methods":"GET,POST,PUT,DELETE,PATCH,OPTIONS","access-control-allow-headers":"*","access-control-expose-headers":"*","access-control-max-age":"3600"},Ze=new Set(["host","origin","referer","sec-fetch-site","sec-fetch-mode","sec-fetch-dest"]);function Oe(o){return o.protocol!=="https:"?{}:de(o.hostname)?{rejectUnauthorized:!1}:{}}function P(o){for(let[e,t]of Object.entries(Ye))o.setHeader(e,t)}function Qe(o,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return o.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function et(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(Xe.has(i.toLowerCase())||(t[i]=Array.isArray(s)?s.join(", "):s));return Object.assign(t,e?Pe(e):{"user-agent":K}),t}function tt(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(Ze.has(i.toLowerCase())||(t[i]=s));return t.host=e.host,t.origin=e.origin,t.referer=`${e.origin}/`,t}function xe(o){return o?.startsWith("/__fetch-proxy?")||o?.startsWith("/__proxy?")||!1}function Le(o){return o?!!(o.startsWith("/__app-api?")||o.startsWith("/__app-api/")):!1}async function Me(o,e){if(o.method==="OPTIONS"){P(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){P(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{P(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n;if(o.method!=="GET"&&o.method!=="HEAD"){let c=[];for await(let d of o)c.push(Buffer.isBuffer(d)?d:Buffer.from(d));c.length>0&&(n=Buffer.concat(c))}let a=o.method||"GET",r=async(c,d,l,u)=>{let m=c.protocol==="https:"?_e:Re,p=et(o.headers,c);c.origin!==s.origin&&(delete p.authorization,delete p["proxy-authorization"]),d==="GET"||d==="HEAD"?(delete p["content-length"],delete p["content-type"]):l&&(p["content-length"]=String(l.byteLength));let h=await new Promise((v,A)=>{let y=m.request({hostname:c.hostname,port:c.port||(c.protocol==="https:"?443:80),path:c.pathname+c.search,method:d,headers:p,...Oe(c)},v),R=()=>y.destroy(new Error("fetch proxy client disconnected"));o.once("aborted",R),y.once("close",()=>o.off("aborted",R)),y.once("error",A),l===void 0?y.end():y.end(l)}),S=h.statusCode??502,g=h.headers.location;if(g&&(S===301||S===302||S===303||S===307||S===308)){if(u>=10)throw h.destroy(),new Error("too many redirects");let v=(S===301||S===302)&&d==="POST"||S===303&&d!=="GET"&&d!=="HEAD",A=new URL(g,c);h.resume(),await qe(h),await r(A,v?"GET":d,v?void 0:l,u+1);return}for(let[v,A]of Object.entries(h.headers)){let y=v.toLowerCase();A===void 0||y==="set-cookie"||y==="connection"||y==="keep-alive"||y==="proxy-authenticate"||y==="proxy-authorization"||y==="te"||y==="trailer"||y==="transfer-encoding"||y==="upgrade"||y.startsWith("access-control-")||e.setHeader(v,A)}P(e);let b=h.headers["set-cookie"]??[];b.length>0&&e.setHeader("x-sootsim-set-cookie",(Array.isArray(b)?b:[b]).join(", ")),e.statusCode=S,await ze(h,e)};try{await r(s,a,n,0)}catch(c){if(e.headersSent){e.destroy(c instanceof Error?c:new Error(String(c)));return}P(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${Qe(s.href,c)}`)}}function Be(o,e){let t=o.url||"",i="",s="";if(t.startsWith("/__app-api?")){let d=new URL(t,"http://sootsim.local");i=d.searchParams.get("path")||"",s=d.searchParams.get("origin")?.trim()||""}else if(t.startsWith("/__app-api/"))i=t.slice(10);else return!1;if(!s)return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: missing origin query param"),!0;if(o.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,s)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let a=n.protocol==="https:"?_e:Re,r=tt(o.headers,n),c=a.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:o.method,headers:r,...Oe(n)},d=>{let l=Object.keys(d.headers).filter(u=>{let m=u.toLowerCase();return!m.startsWith("access-control-")&&m!=="set-cookie"}).join(", ");e.writeHead(d.statusCode??502,{...d.headers,"access-control-allow-origin":o.headers.origin||"*","access-control-allow-credentials":"true","access-control-expose-headers":l}),d.pipe(e)});return c.on("error",d=>{e.statusCode=502,e.end(`app proxy error: ${d.message}`)}),o.pipe(c),!0}import{WebSocket as T,WebSocketServer as it}from"ws";var rt="/__websocket-proxy",nt=new Set(["host","connection","upgrade","transfer-encoding","content-length","sec-websocket-accept","sec-websocket-extensions","sec-websocket-key","sec-websocket-protocol","sec-websocket-version"]);function C(o,e,t){try{o.write(`HTTP/1.1 ${e} ${t}\r
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a as g,b as k}from"./chunk-3F2GAJ4Z.js";import{b as S,c as x}from"./chunk-EXTV6NWM.js";import{c as w}from"./chunk-ZFMJFX27.js";import"./chunk-SLMUW2WU.js";import"./chunk-JGGXQHXH.js";import"./chunk-I233T2T4.js";import"./chunk-4Z4URZOG.js";import"./chunk-DI55E6CS.js";import"./chunk-VXGCZUX4.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import"./chunk-JFWEDISV.js";import{H as v,K as f,M as m,l as b}from"./chunk-WQL3BLFD.js";import"./chunk-PSOUSJSZ.js";import"./chunk-DUHBRW7J.js";import"./chunk-D2R7PDN5.js";import{existsSync as r,mkdirSync as j,readFileSync as d,readdirSync as I,writeFileSync as D}from"fs";import{basename as p,dirname as y,join as i,relative as c,resolve as h}from"path";var T=["bun","pnpm","npm"];async function pe(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
5
|
sootsim setup \u2014 set up this machine for SootSim
|
|
4
6
|
|
|
5
7
|
usage:
|
|
@@ -94,4 +96,4 @@ module.exports = {
|
|
|
94
96
|
4. inspect and drive it:
|
|
95
97
|
sootsim describe
|
|
96
98
|
sootsim do tap-text "Sign in"
|
|
97
|
-
`)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-
|
|
99
|
+
`)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-HV7GZXAH.js");await o([],{port:7668})}async function R(n,e,o){return o.yes?!0:process.stdin.isTTY?g(n,e):(console.log(` ${n} ${e?"[Y/n]":"[y/N]"} n (non-interactive; pass --yes to accept)`),!1)}export{J as detectConfigScaffoldExt,M as detectNodeVersionPins,W as detectPreferredPackageManager,E as readMachineSetupStatus,pe as runSetup,de as shouldRunSetupForBareCommand};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import"./chunk-D2R7PDN5.js";import*as i from"fs";import*as I from"os";import*as a from"path";import{fileURLToPath as h}from"url";function $(){try{let t=h(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(h(import.meta.url));return a.resolve(t,"../../skills")}}var d=$(),w=new Set(["all","codex","claude"]);function S(){console.log(`sootsim skill
|
|
3
5
|
|
|
4
6
|
install and inspect bundled SootSim agent skills.
|
|
5
7
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{k as f}from"./chunk-24BJFJFB.js";import"./chunk-WYRLRNIP.js";import"./chunk-7Q77LTPT.js";import"./chunk-XYFP466E.js";import"./chunk-ZUX5PIGI.js";import"./chunk-RWUNC66S.js";import{a as t,b as n,c as l,d as c,e as a}from"./chunk-KWIURH7N.js";import"./chunk-AMKQUZA2.js";import"./chunk-AFLGWOX3.js";import"./chunk-6YN3IAWJ.js";import"./chunk-37ZXWXM3.js";import"./chunk-VVVORIQI.js";import"./chunk-W44PDEQH.js";import"./chunk-FNCSUHUR.js";import"./chunk-PZTKQG6H.js";import"./chunk-SPQKJDIK.js";import"./chunk-AO65WEF7.js";import"./chunk-4Z4URZOG.js";import"./chunk-DI55E6CS.js";import"./chunk-VXGCZUX4.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import"./chunk-JFWEDISV.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";function p(){console.log(`
|
|
3
5
|
sootsim storage profile \u2014 manage isolated storage profiles
|
|
4
6
|
|
|
5
7
|
usage:
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a}from"./chunk-W44PDEQH.js";import"./chunk-VXGCZUX4.js";import"./chunk-D2R7PDN5.js";export{a as settingsStore};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{c as a,d as b}from"./chunk-ZFMJFX27.js";import"./chunk-SLMUW2WU.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";export{b as flushCliTelemetry,a as trackCliEvent};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{g as m,i as d,l as s}from"./chunk-PZTKQG6H.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";import{writeFileSync as g}from"fs";function u(){console.log(`
|
|
3
5
|
sootsim timeline \u2014 control the semantic event timeline
|
|
4
6
|
|
|
5
7
|
usage:
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a as d}from"./chunk-BBVBMGTT.js";import"./chunk-PZTKQG6H.js";import{a,d as c}from"./chunk-CTMPC5DN.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import{g as r,h as l}from"./chunk-WQL3BLFD.js";import{a as m}from"./chunk-PSOUSJSZ.js";import"./chunk-D2R7PDN5.js";import{spawn as g}from"node:child_process";import u from"node:fs";import p from"node:os";import e from"node:path";var f="https://registry.npmjs.org/sootsim/latest";async function R(o){let n=o.indexOf("--channel"),t=n>=0&&o[n+1]?o[n+1]:void 0;console.log(`sootsim upgrade
|
|
3
5
|
`),console.log("runtime:");let i=c.resolvePin();i&&(console.log(` pinned to ${i} \u2014 installing the pin, not channel latest`),console.log(" (run `sootsim runtime unpin` to follow latest again)")),await d(["install",...t?["--channel",t]:[]],{}),console.log(`
|
|
4
6
|
cli:`),await $()}function h(){if(l())return{kind:"dev"};let o=process.argv[1]??"";try{o=u.realpathSync(o)}catch{}let n=e.sep;if(o.includes(`${n}_npx${n}`)||o.includes(`${n}.bunx${n}`))return{kind:"npx"};if(o.includes(`${n}.bun${n}`))return{kind:"global",command:"bun",args:["add","-g","sootsim@latest"]};if(o.includes(`${n}pnpm${n}`))return{kind:"global",command:"pnpm",args:["add","-g","sootsim@latest"]};let t=e.join(r(),"cli");if(o.startsWith(`${t}${n}`))return{kind:"global",command:"npm",args:["i","-g","--prefix",t,"sootsim@latest"]};let i=e.resolve(process.env.SOOTSIM_CLI_PREFIX||e.join(p.homedir(),".local"));return o.startsWith(`${i}${n}`)?{kind:"global",command:"npm",args:["i","-g","--prefix",i,"sootsim@latest"]}:{kind:"global",command:"npm",args:["i","-g","sootsim@latest"]}}async function $(){let o=m(),n=await k();if(!n){console.log(` v${o} \u2014 couldn't reach the npm registry, skipped`);return}if(a(n,o)<=0){console.log(` v${o} (latest)`);return}let t=h();if(console.log(` v${o} \u2192 v${n}`),t.kind==="dev"){console.log(" running from the Contrast dev checkout \u2014 pull instead of upgrading");return}if(t.kind==="npx"){console.log(" running from the npx cache \u2014 get the latest with:"),console.log(" npx sootsim@latest");return}let i=`${t.command} ${t.args.join(" ")}`;console.log(` updating global install (${i})\u2026`),await v(t.command,t.args)?console.log(` updated to v${n}`):(console.log(" update failed \u2014 run it yourself:"),console.log(` ${i}`))}function v(o,n){return new Promise(t=>{let i=g(o,n,{stdio:"inherit"});i.on("error",()=>t(!1)),i.on("exit",s=>t(s===0))})}async function k(){try{let o=await fetch(f,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!o.ok)return null;let n=await o.json();return typeof n.version=="string"&&n.version?n.version:null}catch{return null}}export{R as runUpgrade};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{e as a,f as b,g as c}from"./chunk-BXO2PTNM.js";import"./chunk-FSRRJGYC.js";import"./chunk-6YN3IAWJ.js";import"./chunk-37ZXWXM3.js";import"./chunk-VVVORIQI.js";import"./chunk-PZTKQG6H.js";import"./chunk-ZFMJFX27.js";import"./chunk-SLMUW2WU.js";import"./chunk-OKSGM6IG.js";import"./chunk-JUOQ4ZPA.js";import"./chunk-WQL3BLFD.js";import"./chunk-D2R7PDN5.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{
|
|
1
|
+
/*! sootsim v0.1.294 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{c as i,d as t}from"./chunk-CTMPC5DN.js";import{a as l}from"./chunk-I233T2T4.js";import"./chunk-WQL3BLFD.js";import{a as s}from"./chunk-PSOUSJSZ.js";import"./chunk-D2R7PDN5.js";async function d(c){let{IS_BETA:r,BETA_LABEL:m}=await import("./beta-RXT5RU3A.js"),a=r?` \xB7 ${m}`:"";console.log(`sootsim v${s()}${a}`);let o=l(),e=t.resolveChannel();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${e}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `sootsim runtime install`"):console.log(`${o.primary} \xB7 ${e}`);let n=await t.checkUpToDate({channel:e});n.pinned&&console.log(` runtime pinned to v${n.pinned} (\`sootsim runtime unpin\` to follow latest)`),n.outdated&&n.latest&&console.log(`
|
|
3
5
|
\u2191 runtime v${n.latest} available \u2014 run \`sootsim upgrade\``),console.log(`
|
|
4
6
|
what's new: ${i}`)}export{d as runVersion};
|